Skip to content

Commit

Permalink
Remove unused c code in rd_rft_node
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Aug 23, 2024
1 parent 93985f4 commit 43353d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
7 changes: 0 additions & 7 deletions lib/include/resdata/rd_rft_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,14 @@ typedef enum {

typedef struct rd_rft_node_struct rd_rft_node_type;

void rd_rft_node_inplace_sort_cells(rd_rft_node_type *rft_node);
const rd_rft_cell_type *rd_rft_node_iget_cell_sorted(rd_rft_node_type *rft_node,
int index);
const rd_rft_cell_type *rd_rft_node_iget_cell(const rd_rft_node_type *rft_node,
int index);
const rd_rft_cell_type *rd_rft_node_lookup_ijk(const rd_rft_node_type *rft_node,
int i, int j, int k);
void rd_rft_node_fprintf_rft_obs(const rd_rft_node_type *, double, const char *,
const char *, double);
rd_rft_node_type *rd_rft_node_alloc(const rd_file_view_type *rft_view);
void rd_rft_node_free(rd_rft_node_type *);
void rd_rft_node_free__(void *);
time_t rd_rft_node_get_date(const rd_rft_node_type *);
int rd_rft_node_get_size(const rd_rft_node_type *);
const char *rd_rft_node_get_well_name(const rd_rft_node_type *rft_node);
Expand All @@ -52,11 +48,8 @@ double rd_rft_node_iget_soil(const rd_rft_node_type *rft_node, int index);
void rd_rft_node_fwrite(const rd_rft_node_type *rft_node, fortio_type *fortio,
ert_rd_unit_enum unit_set);
double rd_rft_node_get_days(const rd_rft_node_type *rft_node);
int rd_rft_node_cmp(const rd_rft_node_type *n1, const rd_rft_node_type *n2);
bool rd_rft_node_lt(const rd_rft_node_type *n1, const rd_rft_node_type *n2);

void rd_rft_node_append_cell(rd_rft_node_type *rft_node,
rd_rft_cell_type *cell);
rd_rft_node_type *rd_rft_node_alloc_new(const char *well_name,
const char *data_type_string,
const time_t recording_date,
Expand Down
8 changes: 2 additions & 6 deletions lib/resdata/rd_rft_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static rd_rft_node_type *rd_rft_node_alloc_empty(const char *data_type_string) {
UTIL_SAFE_CAST_FUNCTION(rd_rft_node, RD_RFT_NODE_ID);
UTIL_IS_INSTANCE_FUNCTION(rd_rft_node, RD_RFT_NODE_ID);

void rd_rft_node_append_cell(rd_rft_node_type *rft_node,
static void rd_rft_node_append_cell(rd_rft_node_type *rft_node,
rd_rft_cell_type *cell) {
if (rft_node->MSW) {
auto pos_iter =
Expand Down Expand Up @@ -309,10 +309,6 @@ void rd_rft_node_free(rd_rft_node_type *rft_node) {
delete rft_node;
}

void rd_rft_node_free__(void *void_node) {
rd_rft_node_free(rd_rft_node_safe_cast(void_node));
}

int rd_rft_node_get_size(const rd_rft_node_type *rft_node) {
return rft_node->cells.size();
}
Expand Down Expand Up @@ -591,7 +587,7 @@ void rd_rft_node_fwrite(const rd_rft_node_type *rft_node, fortio_type *fortio,
}
}

int rd_rft_node_cmp(const rd_rft_node_type *n1, const rd_rft_node_type *n2) {
static int rd_rft_node_cmp(const rd_rft_node_type *n1, const rd_rft_node_type *n2) {
time_t val1 = rd_rft_node_get_date(n1);
time_t val2 = rd_rft_node_get_date(n2);

Expand Down

0 comments on commit 43353d5

Please sign in to comment.