Browse Source

minmea.h: use const if possible

Dr. PO 6 years ago
parent
commit
bf5358dac3
1 changed files with 3 additions and 3 deletions
  1. 3 3
      minmea.h

+ 3 - 3
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;