diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-08-14 14:09:30 -0400 |
---|---|---|
committer | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-08-14 14:09:30 -0400 |
commit | 8a394b9db42a21f684c6ae85005a55c29d060c38 (patch) | |
tree | a85c21348cd7dbc416801df09fc028917d1f3c41 /qt-models/filtermodels.cpp | |
parent | fb47c15cd81970f19aeb9777c4c576b973889674 (diff) | |
download | subsurface-8a394b9db42a21f684c6ae85005a55c29d060c38.tar.gz |
Filter: constify doFilter() argument
Conceptually, the doFilter() functions shouldn't modify the dive
they test. Therefore, make the argument const. To do this, constify
the parameter of get_dive_location(), which likewise seems to be
the right thing to do.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/filtermodels.cpp')
-rw-r--r-- | qt-models/filtermodels.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp index bd95e0ad9..6e5605654 100644 --- a/qt-models/filtermodels.cpp +++ b/qt-models/filtermodels.cpp @@ -132,7 +132,7 @@ int SuitsFilterModel::countDives(const char *s) const return count_dives_with_suit(s); } -bool SuitsFilterModel::doFilter(dive *d) const +bool SuitsFilterModel::doFilter(const dive *d) const { // rowCount() == 0 should never happen, because we have the "no suits" row // let's handle it gracefully anyway. @@ -196,7 +196,7 @@ void TagFilterModel::repopulate() updateList(list); } -bool TagFilterModel::doFilter(dive *d) const +bool TagFilterModel::doFilter(const dive *d) const { // If there's nothing checked, this should show everything // rowCount() == 0 should never happen, because we have the "no tags" row @@ -234,7 +234,7 @@ int BuddyFilterModel::countDives(const char *s) const return count_dives_with_person(s); } -bool BuddyFilterModel::doFilter(dive *d) const +bool BuddyFilterModel::doFilter(const dive *d) const { // If there's nothing checked, this should show everything // rowCount() == 0 should never happen, because we have the "no tags" row @@ -289,7 +289,7 @@ int LocationFilterModel::countDives(const char *s) const return count_dives_with_location(s); } -bool LocationFilterModel::doFilter(struct dive *d) const +bool LocationFilterModel::doFilter(const dive *d) const { // rowCount() == 0 should never happen, because we have the "no location" row // let's handle it gracefully anyway. |