diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-10-25 13:27:39 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2019-10-27 16:30:37 +0100 |
commit | d09aa38552606e175fcda92a12efec5b9d8f5bc8 (patch) | |
tree | c66bcf67479f6bc2bb204812d5c8973f533ce118 | |
parent | f9ea0c1d9cfe6b57a556060b7d9374a64457d183 (diff) |
libmm-glib,location: fix 'unknown' lat/long/alt numeric values
G_MINDOUBLE is 0.0, which is a valid altitude, latitude, and
longitude. Change the 'unknown' location values to -G_MAXDOUBLE
instead, which is a completely invalid value in all cases.
This is strictly an ABI break, but it's also true that until now the
methods returning these 'unknown' values could also return valid 0.0
values that would have been detected as 'unknown' by the caller.
So, just stop this madness and don't consider this any ABI break.
This is the same thing we had to do with MM_SIGNAL_UNKNOWN in
fe66bdf65e57fa7dee3dcb8dea068fb3fc7aec34.
-rw-r--r-- | libmm-glib/mm-location-common.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmm-glib/mm-location-common.h b/libmm-glib/mm-location-common.h index 6397dc6c..ed10baa1 100644 --- a/libmm-glib/mm-location-common.h +++ b/libmm-glib/mm-location-common.h @@ -27,7 +27,7 @@ * * Proper longitude values fall in the [-180,180] range. */ -#define MM_LOCATION_LONGITUDE_UNKNOWN G_MINDOUBLE +#define MM_LOCATION_LONGITUDE_UNKNOWN -G_MAXDOUBLE /** * MM_LOCATION_LATITUDE_UNKNOWN: @@ -36,13 +36,13 @@ * * Proper latitude values fall in the [-90,90] range. */ -#define MM_LOCATION_LATITUDE_UNKNOWN G_MINDOUBLE +#define MM_LOCATION_LATITUDE_UNKNOWN -G_MAXDOUBLE /** * MM_LOCATION_ALTITUDE_UNKNOWN: * * Identifier for an unknown altitude value. */ -#define MM_LOCATION_ALTITUDE_UNKNOWN G_MINDOUBLE +#define MM_LOCATION_ALTITUDE_UNKNOWN -G_MAXDOUBLE #endif /* MM_LOCATION_COMMON_H */ |