From e754b2df846751fee7f93f7a684e7a1126a025a2 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 19 Feb 2020 19:59:01 +0100 Subject: 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 --- core/divefilter.cpp | 21 +++++++++++---------- core/divefilter.h | 1 - 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 &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_sites; -- cgit v1.2.3-70-g09d2