minmea.h: use const if possible

This commit is contained in:
Dr. PO 2018-11-02 15:57:27 +08:00 committed by cmorganBE
parent e2560c5a49
commit bf5358dac3

View File

@ -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.
*/
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)
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.
* 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)
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.
* 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)
return NAN;