Dead code removal

This commit is contained in:
Shahram Najm 2023-06-24 17:34:25 +01:00
parent 546f1d8cf3
commit a0d123257e
5 changed files with 10 additions and 24 deletions

View File

@ -291,7 +291,6 @@ list( APPEND eccodes_src_files
grib_filepool.cc
grib_geography.cc
grib_handle.cc
grib_header_compute.cc
grib_hash_keys.cc
grib_io.cc
grib_trie.cc

View File

@ -1070,11 +1070,6 @@ int grib_handle_prepare_action(grib_handle* h, grib_action* a);
void grib_multi_support_reset_file(grib_context* c, FILE* f);
void grib_multi_support_reset(grib_context* c);
/* grib_header_compute.cc*/
void print_math(grib_math* m);
void grib_math_delete(grib_context* c, grib_math* m);
grib_math* grib_math_new(grib_context* c, const char* formula, int* err);
/* grib_hash_keys.cc*/
const struct grib_keys_hash* grib_keys_hash_get(const char* str, size_t len);
grib_itrie* grib_hash_keys_new(grib_context* c, int* count);

View File

@ -449,12 +449,9 @@ int grib_db_apply_where(grib_fieldset* set)
if (!set)
return GRIB_INVALID_ARGUMENT;
/*
m=grib_math_new(set->context,where_string,&err);
print_math(m);
printf("\n");
*/
// m=grib_math_new(set->context,where_string,&err);
// print_math(m);
// printf("\n");
if (set->filter)
grib_db_delete_int_array(set->filter);

View File

@ -411,21 +411,16 @@ static grib_fieldset* grib_fieldset_create_from_order_by(grib_context* c, grib_o
return set;
}
/* Experimental: Needs more work */
// Experimental: Needs more work
int grib_fieldset_apply_where(grib_fieldset* set, const char* where_string)
{
int err = GRIB_NOT_IMPLEMENTED;
grib_math* m = NULL;
// grib_math* m = NULL;
// m = grib_math_new(set->context, where_string, &err);
// if (err || !m) return err;
if (!set)
return GRIB_INVALID_ARGUMENT;
m = grib_math_new(set->context, where_string, &err);
if (err || !m) return err;
print_math(m);
printf("\n");
grib_math_delete(set->context, m);
// print_math(m);
// printf("\n");
// grib_math_delete(set->context, m);
return GRIB_NOT_IMPLEMENTED;
}