mirror of https://github.com/ecmwf/eccodes.git
Cppcheck warnings: Const correctness
This commit is contained in:
parent
cf796ed5ae
commit
87acf45bb5
|
@ -97,7 +97,7 @@ int grib_encode_string(unsigned char* bitStream, long* bitOffset, size_t numberO
|
|||
int remainder = *bitOffset % 8;
|
||||
unsigned char c;
|
||||
unsigned char* p;
|
||||
unsigned char mask[] = { 0, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE };
|
||||
const unsigned char mask[] = { 0, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE };
|
||||
int remainderComplement = 8 - remainder;
|
||||
char str[512] = {0,};
|
||||
char* s = str;
|
||||
|
|
|
@ -90,7 +90,7 @@ char* grib_decode_string(const unsigned char* bitStream, long* bitOffset, size_t
|
|||
unsigned char c;
|
||||
unsigned char* p;
|
||||
char* s = string;
|
||||
unsigned char mask[] = { 0, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE };
|
||||
const unsigned char mask[] = { 0, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE };
|
||||
int remainderComplement = 8 - remainder;
|
||||
|
||||
if (numberOfCharacters == 0)
|
||||
|
|
|
@ -131,7 +131,7 @@ static void pj_authset(double es, double* APA)
|
|||
APA[1] += t * P11;
|
||||
APA[2] = t * P20;
|
||||
}
|
||||
static double pj_authlat(double beta, double* APA)
|
||||
static double pj_authlat(double beta, const double* APA)
|
||||
{
|
||||
double t = beta + beta;
|
||||
return (beta + APA[0] * sin(t) + APA[1] * sin(t + t) + APA[2] * sin(t + t + t));
|
||||
|
|
Loading…
Reference in New Issue