From e434cdc19eadc91adacb9ba929b57ed14764cd81 Mon Sep 17 00:00:00 2001 From: shahramn Date: Wed, 21 Feb 2024 15:17:13 +0000 Subject: [PATCH] Dead code removal --- src/{ => deprecated}/grib_concept_index.cc | 0 .../grib_expression_class_constant.cc | 8 +-- .../grib_loader_from_array.cc | 0 src/grib_api_internal.h | 58 +++++++++---------- src/grib_expression_class.h | 2 - src/grib_expression_factory.h | 2 - 6 files changed, 28 insertions(+), 42 deletions(-) rename src/{ => deprecated}/grib_concept_index.cc (100%) rename src/{ => deprecated}/grib_loader_from_array.cc (100%) diff --git a/src/grib_concept_index.cc b/src/deprecated/grib_concept_index.cc similarity index 100% rename from src/grib_concept_index.cc rename to src/deprecated/grib_concept_index.cc diff --git a/src/deprecated/grib_expression_class_constant.cc b/src/deprecated/grib_expression_class_constant.cc index e669a6049..bedacd013 100644 --- a/src/deprecated/grib_expression_class_constant.cc +++ b/src/deprecated/grib_expression_class_constant.cc @@ -17,7 +17,7 @@ CLASS = expression IMPLEMENTS = destroy IMPLEMENTS = native_type - IMPLEMENTS = evaluate;print + IMPLEMENTS = print IMPLEMENTS = add_dependency MEMBERS = long value END_CLASS_DEF @@ -78,12 +78,6 @@ static void init_class(grib_expression_class* c) } /* END_CLASS_IMP */ -static long evaluate(grib_expression* g, grib_handle* h) -{ - const grib_expression_constant* e = (grib_expression_constant*)g; - return e->value; -} - static void print(grib_context* c, grib_expression* g, grib_handle* f) { const grib_expression_constant* e = (grib_expression_constant*)g; diff --git a/src/grib_loader_from_array.cc b/src/deprecated/grib_loader_from_array.cc similarity index 100% rename from src/grib_loader_from_array.cc rename to src/deprecated/grib_loader_from_array.cc diff --git a/src/grib_api_internal.h b/src/grib_api_internal.h index 0b516c99b..3e7370f36 100644 --- a/src/grib_api_internal.h +++ b/src/grib_api_internal.h @@ -1225,41 +1225,37 @@ struct grib_fieldset /* concept index structures */ -typedef struct grib_concept_index_key grib_concept_index_key; -typedef struct grib_concept_index grib_concept_index; -typedef struct grib_conditions_tree grib_conditions_tree; -typedef struct grib_concept_entry grib_concept_entry; -typedef struct grib_concept_key grib_concept_key; +//typedef struct grib_concept_index_key grib_concept_index_key; +//typedef struct grib_concept_index grib_concept_index; +//typedef struct grib_conditions_tree grib_conditions_tree; +//typedef struct grib_concept_entry grib_concept_entry; +//typedef struct grib_concept_key grib_concept_key; -struct grib_concept_index_entry -{ - char* name; - char* value; - int type; - grib_concept_entry* next; -}; +// struct grib_concept_index_entry { +// char* name; +// char* value; +// int type; +// grib_concept_entry* next; +// }; -struct grib_concept_index_key -{ - char* name; - int type; - grib_concept_key* next; -}; +// struct grib_concept_index_key { +// char* name; +// int type; +// grib_concept_key* next; +// }; -struct grib_concept_index -{ - grib_context* context; - grib_concept_key* keys; - grib_conditions_tree* conditions; -}; +// struct grib_concept_index { +// grib_context* context; +// grib_concept_key* keys; +// grib_conditions_tree* conditions; +// }; -struct grib_conditions_tree -{ - char* value; - void* object; - grib_conditions_tree* next; - grib_conditions_tree* next_key; -}; +// struct grib_conditions_tree { +// char* value; +// void* object; +// grib_conditions_tree* next; +// grib_conditions_tree* next_key; +// }; /* support for in-memory definition and tables */ diff --git a/src/grib_expression_class.h b/src/grib_expression_class.h index 6856b1b06..8660a7864 100644 --- a/src/grib_expression_class.h +++ b/src/grib_expression_class.h @@ -1,8 +1,6 @@ /* This file is automatically generated by ./make_class.pl, do not edit */ extern grib_expression_class* grib_expression_class_accessor; extern grib_expression_class* grib_expression_class_binop; -extern grib_expression_class* grib_expression_class_column; -extern grib_expression_class* grib_expression_class_constant; extern grib_expression_class* grib_expression_class_double; extern grib_expression_class* grib_expression_class_functor; extern grib_expression_class* grib_expression_class_is_in_dict; diff --git a/src/grib_expression_factory.h b/src/grib_expression_factory.h index 0f5cd83bb..7cacd3ac1 100644 --- a/src/grib_expression_factory.h +++ b/src/grib_expression_factory.h @@ -1,8 +1,6 @@ /* This file is automatically generated by ./make_class.pl, do not edit */ { "accessor", &grib_expression_class_accessor, }, { "binop", &grib_expression_class_binop, }, -{ "column", &grib_expression_class_column, }, -{ "constant", &grib_expression_class_constant, }, { "double", &grib_expression_class_double, }, { "functor", &grib_expression_class_functor, }, { "is_in_dict", &grib_expression_class_is_in_dict, },