minmea.h: use const if possible
This commit is contained in:
parent
e2560c5a49
commit
bf5358dac3
6
minmea.h
6
minmea.h
@ -216,7 +216,7 @@ int minmea_gettime(struct timespec *ts, const struct minmea_date *date, const st
|
|||||||
/**
|
/**
|
||||||
* Rescale a fixed-point value to a different scale. Rounds towards zero.
|
* Rescale a fixed-point value to a different scale. Rounds towards zero.
|
||||||
*/
|
*/
|
||||||
static inline int_least32_t minmea_rescale(struct minmea_float *f, int_least32_t new_scale)
|
static inline int_least32_t minmea_rescale(const struct minmea_float *f, int_least32_t new_scale)
|
||||||
{
|
{
|
||||||
if (f->scale == 0)
|
if (f->scale == 0)
|
||||||
return 0;
|
return 0;
|
||||||
@ -232,7 +232,7 @@ static inline int_least32_t minmea_rescale(struct minmea_float *f, int_least32_t
|
|||||||
* Convert a fixed-point value to a floating-point value.
|
* Convert a fixed-point value to a floating-point value.
|
||||||
* Returns NaN for "unknown" values.
|
* Returns NaN for "unknown" values.
|
||||||
*/
|
*/
|
||||||
static inline float minmea_tofloat(struct minmea_float *f)
|
static inline float minmea_tofloat(const struct minmea_float *f)
|
||||||
{
|
{
|
||||||
if (f->scale == 0)
|
if (f->scale == 0)
|
||||||
return NAN;
|
return NAN;
|
||||||
@ -243,7 +243,7 @@ static inline float minmea_tofloat(struct minmea_float *f)
|
|||||||
* Convert a raw coordinate to a floating point DD.DDD... value.
|
* Convert a raw coordinate to a floating point DD.DDD... value.
|
||||||
* Returns NaN for "unknown" values.
|
* Returns NaN for "unknown" values.
|
||||||
*/
|
*/
|
||||||
static inline float minmea_tocoord(struct minmea_float *f)
|
static inline float minmea_tocoord(const struct minmea_float *f)
|
||||||
{
|
{
|
||||||
if (f->scale == 0)
|
if (f->scale == 0)
|
||||||
return NAN;
|
return NAN;
|
||||||
|
Loading…
Reference in New Issue
Block a user