summaryrefslogtreecommitdiffstats
path: root/map-widget
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-04-01 22:46:07 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commit779c4eb5d07b2aaa768ffd8663462ffcab338ccf (patch)
tree00e66b1753e07a73e3a189d1f2be0cae077e14d2 /map-widget
parent53c9d524ca7038e2cb8a510ede9e3aea9648a326 (diff)
downloadsubsurface-779c4eb5d07b2aaa768ffd8663462ffcab338ccf.tar.gz
Cleanup: remove redundant checks for null dive site
The dive_site_has_gps_location() function already checks for the null dive site. Remove redundant checks. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'map-widget')
-rw-r--r--map-widget/qmlmapwidgethelper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/map-widget/qmlmapwidgethelper.cpp b/map-widget/qmlmapwidgethelper.cpp
index aad201722..b4b64b4d8 100644
--- a/map-widget/qmlmapwidgethelper.cpp
+++ b/map-widget/qmlmapwidgethelper.cpp
@@ -24,14 +24,14 @@ MapWidgetHelper::MapWidgetHelper(QObject *parent) : QObject(parent)
QGeoCoordinate MapWidgetHelper::getCoordinates(struct dive_site *ds)
{
- if (!ds || !dive_site_has_gps_location(ds))
+ if (!dive_site_has_gps_location(ds))
return QGeoCoordinate(0.0, 0.0);
return QGeoCoordinate(ds->location.lat.udeg * 0.000001, ds->location.lon.udeg * 0.000001);
}
void MapWidgetHelper::centerOnDiveSite(struct dive_site *ds)
{
- if (!ds || !dive_site_has_gps_location(ds)) {
+ if (!dive_site_has_gps_location(ds)) {
// dive site with no GPS
m_mapLocationModel->setSelected(ds, false);
QMetaObject::invokeMethod(m_map, "deselectMapLocation");