Skip to content

Commit

Permalink
Remove unused functions in layer.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Aug 23, 2024
1 parent 3bf6988 commit 5ccc162
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
3 changes: 0 additions & 3 deletions lib/include/resdata/layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ bool layer_iget_left_barrier(const layer_type *layer, int i, int j);
bool layer_iget_bottom_barrier(const layer_type *layer, int i, int j);
int layer_get_nx(const layer_type *layer);
int layer_get_ny(const layer_type *layer);
void layer_fprintf_cell(const layer_type *layer, int i, int j, FILE *stream);
void layer_fprintf(const layer_type *layer, FILE *stream);
void layer_fprintf_box(const layer_type *layer, FILE *stream, int i1, int i2,
int j1, int j2);
layer_type *layer_alloc(int nx, int ny);
void layer_free(layer_type *layer);
int layer_replace_cell_values(layer_type *layer, int old_value, int new_value);
Expand Down
15 changes: 1 addition & 14 deletions lib/resdata/layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ static void layer_fprintf_header(const layer_type *layer, FILE *stream, int i1,
fprintf(stream, "\n");
}

void layer_fprintf_box(const layer_type *layer, FILE *stream, int i1, int i2,
static void layer_fprintf_box(const layer_type *layer, FILE *stream, int i1, int i2,
int j1, int j2) {
int i, j;
layer_fprintf_header(layer, stream, i1, i2);
Expand All @@ -398,19 +398,6 @@ void layer_fprintf(const layer_type *layer, FILE *stream) {
layer_fprintf_box(layer, stream, 0, layer->nx - 1, 0, layer->ny - 1);
}

void layer_fprintf_cell(const layer_type *layer, int i, int j, FILE *stream) {
int g = layer_get_global_cell_index(layer, i, j);
cell_type *cell = &layer->data[g];

fprintf(stream, " i:%d j:%d \n", i, j);
fprintf(stream, " *--- %4d ---* \n", cell->edges[TOP_EDGE]);
fprintf(stream, " | | \n");
fprintf(stream, " %4d %4d %4d\n", cell->edges[LEFT_EDGE],
cell->cell_value, cell->edges[RIGHT_EDGE]);
fprintf(stream, " | | \n");
fprintf(stream, " *--- %4d ---* \n", cell->edges[BOTTOM_EDGE]);
}

static bool layer_find_edge(const layer_type *layer, int *i, int *j,
int value) {
int g = layer_get_global_cell_index(layer, *i, *j);
Expand Down

0 comments on commit 5ccc162

Please sign in to comment.