mirror of https://github.com/ecmwf/eccodes.git
Refactoring: removal of duplicated code (dump)
This commit is contained in:
parent
73a147286f
commit
626aee752d
|
@ -16,7 +16,7 @@
|
|||
CLASS = accessor
|
||||
SUPER = grib_accessor_class_long
|
||||
IMPLEMENTS = unpack_long;pack_long
|
||||
IMPLEMENTS = init;dump
|
||||
IMPLEMENTS = init
|
||||
IMPLEMENTS = next_offset
|
||||
IMPLEMENTS = value_count
|
||||
IMPLEMENTS = byte_offset
|
||||
|
@ -43,7 +43,6 @@ static int unpack_long(grib_accessor*, long* val, size_t* len);
|
|||
static long byte_offset(grib_accessor*);
|
||||
static long next_offset(grib_accessor*);
|
||||
static int value_count(grib_accessor*, long*);
|
||||
static void dump(grib_accessor*, grib_dumper*);
|
||||
static void init(grib_accessor*, const long, grib_arguments*);
|
||||
static void update_size(grib_accessor*, size_t);
|
||||
|
||||
|
@ -68,7 +67,7 @@ static grib_accessor_class _grib_accessor_class_unexpanded_descriptors = {
|
|||
&init, /* init */
|
||||
0, /* post_init */
|
||||
0, /* destroy */
|
||||
&dump, /* dump */
|
||||
0, /* dump */
|
||||
&next_offset, /* next_offset */
|
||||
0, /* get length of string */
|
||||
&value_count, /* get number of values */
|
||||
|
@ -122,11 +121,6 @@ static void init(grib_accessor* a, const long len, grib_arguments* args)
|
|||
a->length = 0;
|
||||
}
|
||||
|
||||
static void dump(grib_accessor* a, grib_dumper* dumper)
|
||||
{
|
||||
grib_dump_long(dumper, a, NULL);
|
||||
}
|
||||
|
||||
static int unpack_long(grib_accessor* a, long* val, size_t* len)
|
||||
{
|
||||
grib_accessor_unexpanded_descriptors* self = (grib_accessor_unexpanded_descriptors*)a;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
CLASS = accessor
|
||||
SUPER = grib_accessor_class_long
|
||||
IMPLEMENTS = unpack_long;pack_long
|
||||
IMPLEMENTS = init;dump
|
||||
IMPLEMENTS = init
|
||||
IMPLEMENTS = next_offset
|
||||
IMPLEMENTS = byte_count
|
||||
IMPLEMENTS = value_count
|
||||
|
@ -45,7 +45,6 @@ static long byte_count(grib_accessor*);
|
|||
static long byte_offset(grib_accessor*);
|
||||
static long next_offset(grib_accessor*);
|
||||
static int value_count(grib_accessor*, long*);
|
||||
static void dump(grib_accessor*, grib_dumper*);
|
||||
static void init(grib_accessor*, const long, grib_arguments*);
|
||||
static void update_size(grib_accessor*, size_t);
|
||||
|
||||
|
@ -70,7 +69,7 @@ static grib_accessor_class _grib_accessor_class_unsigned_bits = {
|
|||
&init, /* init */
|
||||
0, /* post_init */
|
||||
0, /* destroy */
|
||||
&dump, /* dump */
|
||||
0, /* dump */
|
||||
&next_offset, /* next_offset */
|
||||
0, /* get length of string */
|
||||
&value_count, /* get number of values */
|
||||
|
@ -149,11 +148,6 @@ static void init(grib_accessor* a, const long len, grib_arguments* args)
|
|||
a->length = compute_byte_count(a);
|
||||
}
|
||||
|
||||
static void dump(grib_accessor* a, grib_dumper* dumper)
|
||||
{
|
||||
grib_dump_long(dumper, a, NULL);
|
||||
}
|
||||
|
||||
static int unpack_long(grib_accessor* a, long* val, size_t* len)
|
||||
{
|
||||
grib_accessor_unsigned_bits* self = (grib_accessor_unsigned_bits*)a;
|
||||
|
|
Loading…
Reference in New Issue