aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 7305166e8..dc37fd4b0 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -654,12 +654,12 @@ void QMLManager::refreshDiveList()
static void setupDivesite(struct dive *d, struct dive_site *ds, double lat, double lon, const char *locationtext)
{
if (ds) {
- ds->latitude.udeg = (int) (lat * 1000000);
- ds->longitude.udeg = (int) (lon * 1000000);
+ ds->latitude.udeg = lrint(lat * 1000000);
+ ds->longitude.udeg = lrint(lon * 1000000);
} else {
degrees_t latData, lonData;
- latData.udeg = (int) lat;
- lonData.udeg = (int) lon;
+ latData.udeg = lrint(lat);
+ lonData.udeg = lrint(lon);
d->dive_site_uuid = create_dive_site_with_gps(locationtext, latData, lonData, d->when);
}
}