summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/locationinformation.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-08 20:55:29 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-10 02:37:03 +0900
commit70cabb968c481e566e8249465f153e05e6dc0347 (patch)
tree7b2af4fb86ed467f99250ddaaf091a7da9f22e9a /desktop-widgets/locationinformation.cpp
parent247194e839cec81304734861db8e8e6e381a5483 (diff)
downloadsubsurface-70cabb968c481e566e8249465f153e05e6dc0347.tar.gz
code cleanup: use explicit zero_location
Again, several different ways to achieve the same thing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/locationinformation.cpp')
-rw-r--r--desktop-widgets/locationinformation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index 2f7b8ffb1..1595db3eb 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -177,7 +177,7 @@ static location_t parseGpsText(const QString &text)
double lat, lon;
if (parseGpsText(text, &lat, &lon))
return create_location(lat, lon);
- return { {0}, {0} };
+ return zero_location;
}
void LocationInformationWidget::diveSiteDeleted(struct dive_site *ds, int)
@@ -215,7 +215,7 @@ void LocationInformationWidget::initFields(dive_site *ds)
DiveFilter::instance()->startFilterDiveSites(QVector<dive_site *>{ ds });
filter_model.invalidate();
} else {
- filter_model.set(0, location_t { degrees_t{ 0 }, degrees_t{ 0 } });
+ filter_model.set(0, zero_location);
clearLabels();
}
}
@@ -270,7 +270,7 @@ void LocationInformationWidget::reverseGeocode()
Command::editDiveSiteTaxonomy(diveSite, taxonomy);
}
-DiveLocationFilterProxyModel::DiveLocationFilterProxyModel(QObject *) : currentLocation({{0}, {0}})
+DiveLocationFilterProxyModel::DiveLocationFilterProxyModel(QObject *) : currentLocation(zero_location)
{
}
@@ -574,7 +574,7 @@ void DiveLocationLineEdit::setCurrentDiveSite(struct dive *d)
currentLocation = dive_get_gps_location(d);
} else {
currDs = nullptr;
- currentLocation = location_t{{0}, {0}};
+ currentLocation = zero_location;
}
if (!currDs)
clear();