Skip to content

Commit

Permalink
Remove unused well_segment_free__
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Aug 23, 2024
1 parent 67de8c8 commit b7d5ab4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
1 change: 0 additions & 1 deletion lib/include/resdata/well/well_segment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ well_segment_alloc_from_kw(const rd_kw_type *iseg_kw,
well_segment_type *well_segment_alloc(int segment_id, int outlet_segment_id,
int branch_id, const double *rseg_data);
void well_segment_free(well_segment_type *segment);
void well_segment_free__(void *arg);

bool well_segment_active(const well_segment_type *segment);
bool well_segment_main_stem(const well_segment_type *segment);
Expand Down
19 changes: 0 additions & 19 deletions lib/resdata/well_segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,32 +98,13 @@ well_segment_alloc_from_kw(const rd_kw_type *iseg_kw,
}
}

/*
if (iseg_kw != NULL) {
if (conn->segment != WELL_CONN_NORMAL_WELL_SEGMENT_ID) {
} else {
conn->branch = 0;
conn->outlet_segment = 0;
}
} else {
conn->branch = 0;
conn->outlet_segment = 0;
}
*/

void well_segment_free(well_segment_type *segment) {
for (auto &pair : segment->connections)
well_conn_collection_free(pair.second);

delete segment;
}

void well_segment_free__(void *arg) {
well_segment_type *segment = well_segment_safe_cast(arg);
well_segment_free(segment);
}

bool well_segment_active(const well_segment_type *segment) {
if (segment->branch_id == WELL_SEGMENT_BRANCH_INACTIVE_VALUE)
return false;
Expand Down

0 comments on commit b7d5ab4

Please sign in to comment.