Dead code removal: more boxes!

This commit is contained in:
Shahram Najm 2023-06-21 11:47:11 +01:00
parent 1ebeb6f22c
commit 7d86e7f606
3 changed files with 25 additions and 39 deletions

View File

@ -325,9 +325,6 @@ list( APPEND eccodes_src_files
grib_expression_class_double.cc
grib_expression_class_string.cc
grib_expression_class_sub_string.cc
grib_box.cc
grib_box_class.cc
grib_box_class_gen.cc
grib_nearest.cc
grib_nearest_class.cc
grib_nearest_class_gen.cc
@ -363,8 +360,6 @@ list( APPEND eccodes_src_files
grib_accessor_factory.h
grib_api_internal.h
eccodes_prototypes.h
grib_box_class.h
grib_box_factory.h
grib_dumper_class.h
grib_dumper_factory.h
grib_emoslib.h

View File

@ -1347,15 +1347,6 @@ grib_expression* new_string_expression(grib_context* c, const char* value);
/* grib_expression_class_sub_string.cc*/
grib_expression* new_sub_string_expression(grib_context* c, const char* value, size_t start, size_t length);
/* grib_box.cc*/
int grib_box_init(grib_box* box, grib_handle* h, grib_arguments* args);
void grib_points_delete(grib_points* points);
/* grib_box_class.cc*/
grib_box* grib_box_factory(grib_handle* h, grib_arguments* args);
/* grib_box_class_gen.cc*/
/* grib_nearest.cc*/
int grib_nearest_find(grib_nearest* nearest, const grib_handle* h, double inlat, double inlon, unsigned long flags, double* outlats, double* outlons, double* values, double* distances, int* indexes, size_t* len);
int grib_nearest_init(grib_nearest* i, grib_handle* h, grib_arguments* args);

View File

@ -272,7 +272,7 @@ typedef struct grib_smart_table grib_smart_table;
typedef struct grib_accessor grib_accessor;
typedef struct grib_iterator_class grib_iterator_class;
typedef struct grib_nearest_class grib_nearest_class;
typedef struct grib_box_class grib_box_class;
// typedef struct grib_box_class grib_box_class;
typedef struct grib_dumper grib_dumper;
typedef struct grib_dumper_class grib_dumper_class;
typedef struct grib_dependency grib_dependency;
@ -292,10 +292,10 @@ typedef int (*nearest_find_proc)(grib_nearest* nearest, grib_handle* h,
double* distances, int* indexes, size_t* len);
typedef int (*nearest_destroy_proc)(grib_nearest* nearest);
typedef void (*box_init_class_proc)(grib_box_class*);
typedef int (*box_destroy_proc)(grib_box*);
typedef int (*box_init_proc)(grib_box*, grib_handle*, grib_arguments*);
typedef grib_points* (*box_get_points_proc)(grib_box*, double, double, double, double, int*);
// typedef void (*box_init_class_proc)(grib_box_class*);
// typedef int (*box_destroy_proc)(grib_box*);
// typedef int (*box_init_proc)(grib_box*, grib_handle*, grib_arguments*);
// typedef grib_points* (*box_get_points_proc)(grib_box*, double, double, double, double, int*);
typedef void (*iterator_init_class_proc)(grib_iterator_class*);
typedef int (*iterator_init_proc)(grib_iterator* i, grib_handle*, grib_arguments*);
@ -631,17 +631,17 @@ struct grib_nearest_class
nearest_find_proc find;
};
struct grib_box_class
{
grib_box_class** super;
const char* name;
size_t size;
int inited;
box_init_class_proc init_class;
box_init_proc init;
box_destroy_proc destroy;
box_get_points_proc get_points;
};
// struct grib_box_class
// {
// grib_box_class** super;
// const char* name;
// size_t size;
// int inited;
// box_init_class_proc init_class;
// box_init_proc init;
// box_destroy_proc destroy;
// box_get_points_proc get_points;
// };
/* --------------- */
/* --------------- */
@ -712,15 +712,15 @@ struct grib_nearest
unsigned long flags;
};
struct grib_box
{
grib_box_class* cclass;
grib_context* context;
grib_arguments* args;
grib_handle* h;
unsigned long flags;
grib_points* points;
};
// struct grib_box
// {
// grib_box_class* cclass;
// grib_context* context;
// grib_arguments* args;
// grib_handle* h;
// unsigned long flags;
// grib_points* points;
// };
struct grib_dependency
{