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>
This commit is contained in:
Berthold Stoeger 2020-02-19 19:59:01 +01:00 committed by Dirk Hohndel
parent 78405c7265
commit e754b2df84
2 changed files with 11 additions and 11 deletions

View file

@ -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;

View file

@ -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;