Skip to content

Commit

Permalink
Remove unused c code in well_ts
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Aug 30, 2024
1 parent 5deffca commit 88dae20
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
4 changes: 0 additions & 4 deletions lib/include/resdata/well/well_ts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ typedef struct well_ts_struct well_ts_type;
void well_ts_free(well_ts_type *well_ts);
void well_ts_add_well(well_ts_type *well_ts, well_state_type *well_state);
well_ts_type *well_ts_alloc(const char *well_name);
void well_ts_free__(void *arg);
well_state_type *well_ts_get_state_from_sim_time(const well_ts_type *well_ts,
time_t sim_time);
well_state_type *well_ts_get_state_from_report(const well_ts_type *well_ts,
int report_nr);
well_state_type *well_ts_iget_state(const well_ts_type *well_ts, int index);
int well_ts_get_size(const well_ts_type *well_ts);
const char *well_ts_get_name(const well_ts_type *well_ts);
well_state_type *well_ts_get_first_state(const well_ts_type *well_ts);
well_state_type *well_ts_get_last_state(const well_ts_type *well_ts);

#ifdef __cplusplus
Expand Down
18 changes: 0 additions & 18 deletions lib/resdata/well_ts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,8 @@ void well_ts_free(well_ts_type *well_ts) {
delete well_ts;
}

void well_ts_free__(void *arg) {
well_ts_type *well_ts = well_ts_safe_cast(arg);
well_ts_free(well_ts);
}

int well_ts_get_size(const well_ts_type *well_ts) { return well_ts->ts.size(); }

well_state_type *well_ts_get_first_state(const well_ts_type *well_ts) {
return well_ts_iget_state(well_ts, 0);
}

well_state_type *well_ts_get_last_state(const well_ts_type *well_ts) {
return well_ts_iget_state(well_ts, well_ts->ts.size() - 1);
}
Expand All @@ -273,12 +264,3 @@ well_state_type *well_ts_get_state_from_report(const well_ts_type *well_ts,
else
return well_ts_iget_state(well_ts, index);
}

well_state_type *well_ts_get_state_from_sim_time(const well_ts_type *well_ts,
time_t sim_time) {
int index = well_ts_get_index(well_ts, -1, sim_time, false);
if (index < 0)
return NULL;
else
return well_ts_iget_state(well_ts, index);
}

0 comments on commit 88dae20

Please sign in to comment.