Dead code removal

This commit is contained in:
shahramn 2024-08-18 12:50:08 +01:00
parent 11ea6745c3
commit 1b532e9260
4 changed files with 21 additions and 23 deletions

View File

@ -122,26 +122,26 @@ static grib_trie* load_dictionary(grib_accessor* a, int* err)
fclose(f);
if (localFilename != 0) {
f = codes_fopen(localFilename, "r");
if (!f) {
*err = GRIB_IO_PROBLEM;
return NULL;
}
*err = GRIB_NOT_IMPLEMENTED;
return NULL;
// f = codes_fopen(localFilename, "r");
// if (!f) {
// *err = GRIB_IO_PROBLEM;
// return NULL;
// }
while (fgets(line, sizeof(line) - 1, f)) {
i = 0;
while (line[i] != '|' && line[i] != 0) {
key[i] = line[i];
i++;
}
key[i] = 0;
list = (char*)grib_context_malloc_clear(c, strlen(line) + 1);
memcpy(list, line, strlen(line));
grib_trie_insert(dictionary, key, list);
}
fclose(f);
// while (fgets(line, sizeof(line) - 1, f)) {
// i = 0;
// while (line[i] != '|' && line[i] != 0) {
// key[i] = line[i];
// i++;
// }
// key[i] = 0;
// list = (char*)grib_context_malloc_clear(c, strlen(line) + 1);
// memcpy(list, line, strlen(line));
// grib_trie_insert(dictionary, key, list);
//}
//fclose(f);
}
grib_trie_insert(c->lists, filename, dictionary);
return dictionary;

View File

@ -19,7 +19,7 @@ class grib_accessor_class_long_t : public grib_accessor_class_gen_t
{
public:
grib_accessor_class_long_t(const char* name) : grib_accessor_class_gen_t(name) {}
grib_accessor* create_empty_accessor() override { return new grib_accessor_long_t{}; }
// grib_accessor* create_empty_accessor() override { return new grib_accessor_long_t{}; }
void init(grib_accessor* a, const long len, grib_arguments* arg) override;
int get_native_type(grib_accessor* a) override;
int pack_missing(grib_accessor* a) override;

View File

@ -26,7 +26,7 @@ class grib_accessor_class_values_t : public grib_accessor_class_gen_t
{
public:
grib_accessor_class_values_t(const char* name) : grib_accessor_class_gen_t(name) {}
grib_accessor* create_empty_accessor() override { return new grib_accessor_values_t{}; }
// grib_accessor* create_empty_accessor() override { return new grib_accessor_values_t{}; }
int get_native_type(grib_accessor*) override;
int pack_long(grib_accessor*, const long* val, size_t* len) override;
long byte_count(grib_accessor*) override;

View File

@ -85,7 +85,6 @@ static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)
long v2 = 0;
grib_expression_binop* e = (grib_expression_binop*)g;
// #if DEBUGGING
// {
// int typeLeft, typeRight;
// const char* nameLeft;
@ -117,7 +116,6 @@ static int evaluate_double(grib_expression* g, grib_handle* h, double* dres)
double v2 = 0.0;
grib_expression_binop* e = (grib_expression_binop*)g;
// #if DEBUGGING
// {
// int typeLeft, typeRight;
// const char* nameLeft;