Cppcheck warnings: Const correctness

This commit is contained in:
Shahram Najm 2021-11-06 19:33:00 +00:00
parent 6ae358e67e
commit a5f44eebca
3 changed files with 4 additions and 4 deletions

View File

@ -89,7 +89,7 @@ static void init_table_if_needed()
GRIB_MUTEX_UNLOCK(&mutex)
}
static void binary_search(double xx[], const unsigned long n, double x, unsigned long* j)
static void binary_search(const double xx[], const unsigned long n, double x, unsigned long* j)
{
/*These routine works only on ascending ordered arrays*/
unsigned long ju, jm, jl;

View File

@ -95,7 +95,7 @@ static void init_table_if_needed()
GRIB_MUTEX_UNLOCK(&mutex)
}
static void binary_search(double xx[], const unsigned long n, double x, unsigned long* j)
static void binary_search(const double xx[], const unsigned long n, double x, unsigned long* j)
{
/*These routine works only on ascending ordered arrays*/
unsigned long ju, jm, jl;

View File

@ -91,7 +91,7 @@ static void init_class(grib_iterator_class* c)
}
/* END_CLASS_IMP */
static void binary_search(double xx[], const unsigned long n, double x, unsigned long* j);
static void binary_search(const double xx[], const unsigned long n, double x, unsigned long* j);
static int init(grib_iterator* i, grib_handle* h, grib_arguments* args)
{
@ -164,7 +164,7 @@ static int init(grib_iterator* i, grib_handle* h, grib_arguments* args)
return ret;
}
static void binary_search(double xx[], const unsigned long n, double x, unsigned long* j)
static void binary_search(const double xx[], const unsigned long n, double x, unsigned long* j)
{
/*This routine works only on descending ordered arrays*/
#define EPSILON 1e-3