aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-19 19:59:01 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-01 10:21:44 -0800
commite754b2df846751fee7f93f7a684e7a1126a025a2 (patch)
treea70689421d892f8609af7dfbde4a506264960bd8 /core
parent78405c726575e3c00a0f2cd0651f0e0338295a07 (diff)
downloadsubsurface-e754b2df846751fee7f93f7a684e7a1126a025a2.tar.gz
filter: remove DiveFilter::updateDiveStatus from class
This function did not access any class members and was not used outside the tranlation unit. Let's make it local (i.e. static) to the translation unit. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/divefilter.cpp21
-rw-r--r--core/divefilter.h1
2 files changed, 11 insertions, 11 deletions
diff --git a/core/divefilter.cpp b/core/divefilter.cpp
index a867dc58f..2aec89dc5 100644
--- a/core/divefilter.cpp
+++ b/core/divefilter.cpp
@@ -1,6 +1,17 @@
// SPDX-License-Identifier: GPL-2.0
#include "divefilter.h"
+#include "divelist.h"
+
+static void updateDiveStatus(dive *d, bool newStatus, ShownChange &change)
+{
+ if (filter_dive(d, newStatus)) {
+ if (newStatus)
+ change.newShown.push_back(d);
+ else
+ change.newHidden.push_back(d);
+ }
+}
#ifdef SUBSURFACE_MOBILE
@@ -31,16 +42,6 @@ ShownChange DiveFilter::updateAll() const
#include "core/divesite.h"
#include "qt-models/filtermodels.h"
-void DiveFilter::updateDiveStatus(dive *d, bool newStatus, ShownChange &change) const
-{
- if (filter_dive(d, newStatus)) {
- if (newStatus)
- change.newShown.push_back(d);
- else
- change.newHidden.push_back(d);
- }
-}
-
ShownChange DiveFilter::update(const QVector<dive *> &dives) const
{
dive *old_current = current_dive;
diff --git a/core/divefilter.h b/core/divefilter.h
index d035bbfcb..ca17e3741 100644
--- a/core/divefilter.h
+++ b/core/divefilter.h
@@ -99,7 +99,6 @@ public:
ShownChange updateAll() const; // Update filter status of all dives and return dives whose status changed
private:
DiveFilter();
- void updateDiveStatus(dive *d, bool newStatus, ShownChange &change) const;
bool showDive(const struct dive *d) const; // Should that dive be shown?
QVector<dive_site *> dive_sites;