From f518780f437735322ad3c100fffd48c926e36c2e Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 13 Mar 2023 15:44:32 +0000 Subject: [PATCH] ECC-1467: Fix function overrides --- src/grib_accessor_class_data_apply_bitmap.cc | 1 - src/grib_accessor_class_data_apply_boustrophedonic.cc | 2 +- src/grib_accessor_class_data_complex_packing.cc | 6 ++---- src/grib_accessor_class_data_g22order_packing.cc | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/grib_accessor_class_data_apply_bitmap.cc b/src/grib_accessor_class_data_apply_bitmap.cc index 4711e7215..91686bafc 100644 --- a/src/grib_accessor_class_data_apply_bitmap.cc +++ b/src/grib_accessor_class_data_apply_bitmap.cc @@ -45,7 +45,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int pack_double(grib_accessor*, const double* val, size_t* len); -template static int unpack(grib_accessor* a, T* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); diff --git a/src/grib_accessor_class_data_apply_boustrophedonic.cc b/src/grib_accessor_class_data_apply_boustrophedonic.cc index d1f2bbfbd..1f642c8d0 100644 --- a/src/grib_accessor_class_data_apply_boustrophedonic.cc +++ b/src/grib_accessor_class_data_apply_boustrophedonic.cc @@ -18,6 +18,7 @@ SUPER = grib_accessor_class_gen IMPLEMENTS = init IMPLEMENTS = unpack_double;unpack_double_element;unpack_double_element_set + IMPLEMENTS = unpack_float IMPLEMENTS = pack_double IMPLEMENTS = value_count IMPLEMENTS = dump;get_native_type @@ -128,7 +129,6 @@ static void init_class(grib_accessor_class* c) c->pack_long = (*(c->super))->pack_long; c->unpack_long = (*(c->super))->unpack_long; c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; c->pack_string_array = (*(c->super))->pack_string_array; diff --git a/src/grib_accessor_class_data_complex_packing.cc b/src/grib_accessor_class_data_complex_packing.cc index e10249fed..3b45cb480 100644 --- a/src/grib_accessor_class_data_complex_packing.cc +++ b/src/grib_accessor_class_data_complex_packing.cc @@ -48,16 +48,12 @@ or edit "accessor.class" and rerun ./make_class.pl */ static int pack_double(grib_accessor*, const double* val, size_t* len); -template static int unpack(grib_accessor* a, T* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); static void init_class(grib_accessor_class*); -typedef unsigned long (*encode_float_proc)(double); -typedef double (*decode_float_proc)(unsigned long); - typedef struct grib_accessor_data_complex_packing { grib_accessor att; @@ -185,6 +181,8 @@ static void init_class(grib_accessor_class* c) /* END_CLASS_IMP */ +typedef unsigned long (*encode_float_proc)(double); +typedef double (*decode_float_proc)(unsigned long); static void init(grib_accessor* a, const long v, grib_arguments* args) { diff --git a/src/grib_accessor_class_data_g22order_packing.cc b/src/grib_accessor_class_data_g22order_packing.cc index fb44f8ef9..ae3a6d9e3 100644 --- a/src/grib_accessor_class_data_g22order_packing.cc +++ b/src/grib_accessor_class_data_g22order_packing.cc @@ -20,6 +20,7 @@ SUPER = grib_accessor_class_values IMPLEMENTS = init IMPLEMENTS = unpack_double + IMPLEMENTS = unpack_float IMPLEMENTS = pack_double IMPLEMENTS = unpack_double_element;unpack_double_element_set IMPLEMENTS = value_count @@ -58,7 +59,6 @@ or edit "accessor.class" and rerun ./make_class.pl */ static int pack_double(grib_accessor*, const double* val, size_t* len); -template static int unpack(grib_accessor* a, T* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); @@ -167,7 +167,6 @@ static void init_class(grib_accessor_class* c) c->pack_long = (*(c->super))->pack_long; c->unpack_long = (*(c->super))->unpack_long; c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; c->pack_string_array = (*(c->super))->pack_string_array;