Skip to content

Commit

Permalink
Dead code removal
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramn committed Feb 21, 2024
1 parent 5b223d2 commit e434cdc
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 46 deletions.
File renamed without changes.
8 changes: 1 addition & 7 deletions src/deprecated/grib_expression_class_constant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
File renamed without changes.
66 changes: 31 additions & 35 deletions src/grib_api_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

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
{
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;
};
//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_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_conditions_tree {
// char* value;
// void* object;
// grib_conditions_tree* next;
// grib_conditions_tree* next_key;
// };

/* support for in-memory definition and tables */

Expand Down
2 changes: 0 additions & 2 deletions src/grib_expression_class.h
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/grib_expression_factory.h
Original file line number Diff line number Diff line change
@@ -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, },
Expand Down

0 comments on commit e434cdc

Please sign in to comment.