View | Details | Raw Unified | Return to bug 210991 | Differences between
and this patch

Collapse All | Expand All

(-)files/patch-exif.cc (+26 lines)
Line 0 Link Here
1
--- exif.cc.orig	2016-01-03 02:09:17 UTC
2
+++ exif.cc
3
@@ -1100,7 +1100,7 @@ exif_find_wpt_by_time(const Waypoint* wp
4
 
5
   if (exif_wpt_ref == NULL) {
6
     exif_wpt_ref = wpt;
7
-  } else if (abs(exif_time_ref - wpt->creation_time.toTime_t()) < abs(exif_time_ref - exif_wpt_ref->creation_time.toTime_t())) {
8
+  } else if (qAbs(exif_time_ref - wpt->creation_time.toTime_t()) < qAbs(exif_time_ref - exif_wpt_ref->creation_time.toTime_t())) {
9
     exif_wpt_ref = wpt;
10
   }
11
 }
12
@@ -1447,12 +1447,12 @@ exif_write(void)
13
 
14
     if (exif_wpt_ref == NULL) {
15
       warning(MYNAME ": No point with a valid timestamp found.\n");
16
-    } else if (abs(exif_time_ref - exif_wpt_ref->creation_time.toTime_t()) > frame) {
17
+    } else if (qAbs(exif_time_ref - exif_wpt_ref->creation_time.toTime_t()) > frame) {
18
       warning(MYNAME ": No matching point found for image date %s!\n", qPrintable(str));
19
       if (exif_wpt_ref != NULL) {
20
         QString str = exif_time_str(exif_wpt_ref->creation_time.toTime_t());
21
         warning(MYNAME ": Best is from %s, %d second(s) away.\n",
22
-                qPrintable(str), abs(exif_time_ref - exif_wpt_ref->creation_time.toTime_t()));
23
+                qPrintable(str), (int) qAbs(exif_time_ref - exif_wpt_ref->creation_time.toTime_t()));
24
       }
25
       exif_wpt_ref = NULL;
26
     }

Return to bug 210991