Dead code removal

This commit is contained in:
shahramn 2024-02-23 15:25:39 +00:00
parent 94a3064854
commit 27b7b44eb7
2 changed files with 16 additions and 17 deletions

View File

@ -172,7 +172,6 @@ void grib_concept_condition_delete(grib_context* c, grib_concept_condition* v);
/* grib_hash_array.cc*/
grib_hash_array_value* grib_integer_hash_array_value_new(grib_context* c, const char* name, grib_iarray* array);
void grib_hash_array_value_delete(grib_context* c, grib_hash_array_value* v);
/* grib_bufr_descriptor.cc*/
bufr_descriptor* grib_bufr_descriptor_new(grib_accessor* tables_accessor, int code, int silent, int* err);

View File

@ -30,19 +30,19 @@ grib_hash_array_value* grib_integer_hash_array_value_new(grib_context* c, const
// return v;
// }
void grib_hash_array_value_delete(grib_context* c, grib_hash_array_value* v)
{
switch (v->type) {
case GRIB_HASH_ARRAY_TYPE_INTEGER:
grib_iarray_delete(v->iarray);
break;
case GRIB_HASH_ARRAY_TYPE_DOUBLE:
grib_darray_delete(c, v->darray);
break;
default:
grib_context_log(c, GRIB_LOG_ERROR,
"wrong type in grib_hash_array_value_delete");
}
grib_context_free_persistent(c, v->name);
grib_context_free_persistent(c, v);
}
// void grib_hash_array_value_delete(grib_context* c, grib_hash_array_value* v)
// {
// switch (v->type) {
// case GRIB_HASH_ARRAY_TYPE_INTEGER:
// grib_iarray_delete(v->iarray);
// break;
// case GRIB_HASH_ARRAY_TYPE_DOUBLE:
// grib_darray_delete(c, v->darray);
// break;
// default:
// grib_context_log(c, GRIB_LOG_ERROR,
// "wrong type in grib_hash_array_value_delete");
// }
// grib_context_free_persistent(c, v->name);
// grib_context_free_persistent(c, v);
// }