From bf5358dac39a89e11c20c1a135978e332cfa10c0 Mon Sep 17 00:00:00 2001 From: "Dr. PO" Date: Fri, 2 Nov 2018 15:57:27 +0800 Subject: [PATCH] minmea.h: use const if possible --- minmea.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/minmea.h b/minmea.h index 181d8c7..eb4202f 100644 --- a/minmea.h +++ b/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. */ -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;