mirror of https://github.com/ecmwf/eccodes.git
Accessors: Refactoring
This commit is contained in:
parent
fcd51754fc
commit
b85b85348b
|
@ -115,13 +115,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
|||
int ret = GRIB_SUCCESS;
|
||||
double value = 0;
|
||||
|
||||
if (*len < 1) {
|
||||
*len = 1;
|
||||
return GRIB_ARRAY_TOO_SMALL;
|
||||
}
|
||||
|
||||
ret = grib_get_double_internal(grib_handle_of_accessor(a), self->val, &value);
|
||||
|
||||
if (ret != GRIB_SUCCESS)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -116,13 +116,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
|||
int ret = GRIB_SUCCESS;
|
||||
double value = 0;
|
||||
|
||||
if (*len < 1) {
|
||||
*len = 1;
|
||||
return GRIB_ARRAY_TOO_SMALL;
|
||||
}
|
||||
|
||||
ret = grib_get_double_internal(grib_handle_of_accessor(a), self->val, &value);
|
||||
|
||||
if (ret != GRIB_SUCCESS)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ int grib_process_runtime_options(grib_context* context, int argc, char** argv, g
|
|||
|
||||
#ifndef ECCODES_ON_WINDOWS
|
||||
/* Check at compile time to ensure our file offset is at least 64 bits */
|
||||
COMPILE_TIME_ASSERT(sizeof(options->infile_offset) >= 8);
|
||||
static_assert(sizeof(options->infile_offset) >= 8);
|
||||
#endif
|
||||
|
||||
has_output = grib_options_on("U");
|
||||
|
|
|
@ -340,7 +340,7 @@ static int grib_tool_without_orderby(grib_runtime_options* options)
|
|||
if (options->infile_offset) {
|
||||
#ifndef ECCODES_ON_WINDOWS
|
||||
/* Check at compile time to ensure our file offset is at least 64 bits */
|
||||
COMPILE_TIME_ASSERT(sizeof(options->infile_offset) >= 8);
|
||||
static_assert(sizeof(options->infile_offset) >= 8);
|
||||
#endif
|
||||
err = fseeko(infile->file, options->infile_offset, SEEK_SET);
|
||||
if (err) {
|
||||
|
|
Loading…
Reference in New Issue