aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-11-18 23:46:55 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-18 19:21:38 -0800
commitebdcc7fd5478a9bf7074611952bd1d1d3183e5c6 (patch)
tree0bcc513440a7942d6a01c451ffa3ee4bc2616bd5
parent418a345287818f9a4f1baafedbeebd4070c23872 (diff)
downloadsubsurface-ebdcc7fd5478a9bf7074611952bd1d1d3183e5c6.tar.gz
gpslocation.cpp: fix signed vs unsinged int comparison warning
QDateTime::toTime_t() is misleading as it does not return a C time_t type, but a 'unsigned int' or rather the Qt 'uint' typedef. To prevent the warning we cast it to 'time_t' and to comply with the 'lastTime' variable. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--subsurface-core/gpslocation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/subsurface-core/gpslocation.cpp b/subsurface-core/gpslocation.cpp
index 412bf95ad..06af74c0c 100644
--- a/subsurface-core/gpslocation.cpp
+++ b/subsurface-core/gpslocation.cpp
@@ -67,7 +67,7 @@ void GpsLocation::newPosition(QGeoPositionInfo pos)
// if we have no record stored or if at least the configured minimum
// time has passed or we moved at least the configured minimum distance
if (!nr ||
- pos.timestamp().toTime_t() > lastTime + prefs.time_threshold ||
+ (time_t)pos.timestamp().toTime_t() > lastTime + prefs.time_threshold ||
lastCoord.distanceTo(pos.coordinate()) > prefs.distance_threshold) {
geoSettings->setValue("count", nr + 1);
geoSettings->setValue(QString("gpsFix%1_time").arg(nr), pos.timestamp().toTime_t());