From 88dae200baafafbe9e31f56f38c924a699da6817 Mon Sep 17 00:00:00 2001 From: Eivind Jahren Date: Fri, 23 Aug 2024 13:56:28 +0200 Subject: [PATCH] Remove unused c code in well_ts --- lib/include/resdata/well/well_ts.hpp | 4 ---- lib/resdata/well_ts.cpp | 18 ------------------ 2 files changed, 22 deletions(-) diff --git a/lib/include/resdata/well/well_ts.hpp b/lib/include/resdata/well/well_ts.hpp index 52c08a474..33ebcdc38 100644 --- a/lib/include/resdata/well/well_ts.hpp +++ b/lib/include/resdata/well/well_ts.hpp @@ -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 diff --git a/lib/resdata/well_ts.cpp b/lib/resdata/well_ts.cpp index a37df5a6a..731590413 100644 --- a/lib/resdata/well_ts.cpp +++ b/lib/resdata/well_ts.cpp @@ -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); } @@ -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); -}