summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/modeldelegates.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-27 15:18:29 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-29 00:09:31 +0000
commite8b3fdb4a6936c1130395e039963839d64f2b396 (patch)
treecce9f8dbba5dd3b492a88a8fa4a2462665b453bb /desktop-widgets/modeldelegates.cpp
parent724055f0af4fb7cdb9f1570967fe4b34797f3419 (diff)
downloadsubsurface-e8b3fdb4a6936c1130395e039963839d64f2b396.tar.gz
Dive site: compare pointers in MultiFilterSortModel::showDive()
To test whether to show a dive, the UUIDs of the filtered-by location and the dive-site of a dive were compared. Since UUIDs are unique (as the name implies), directly compare pointers. Note: this code comes from a time when the filtered-by location was not a pointer, but a copy. Moreover, the if tested first for the same name, then (logical-or) for the same uuid. This makes no sense, as the same dive-site implies the same name. This code likewise can be explained by historic reasons: the filtered-by location may have contained a different name. Swap the order of the conditions: first test for the same object and only of the objects differ, test for the same same. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/modeldelegates.cpp')
0 files changed, 0 insertions, 0 deletions