aboutsummaryrefslogtreecommitdiffstats
path: root/info.c
diff options
context:
space:
mode:
Diffstat (limited to 'info.c')
-rw-r--r--info.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/info.c b/info.c
index b411ed56d..6a568120f 100644
--- a/info.c
+++ b/info.c
@@ -506,12 +506,9 @@ static gboolean gps_changed(struct dive *dive, struct dive *master, const char *
if (!parse_gps_text(gps_text, &latitude, &longitude))
return FALSE;
- latudeg = 1000000 * latitude + 0.5;
- longudeg = 1000000 * longitude + 0.5;
+ latudeg = rint(1000000 * latitude);
+ longudeg = rint(1000000 * longitude);
- /* if master gps didn't change, don't change dive */
- if (master && master->latitude.udeg == latudeg && master->longitude.udeg == longudeg)
- return FALSE;
/* if dive gps didn't change, nothing changed */
if (dive->latitude.udeg == latudeg && dive->longitude.udeg == longudeg)
return FALSE;