summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-12-29 19:29:23 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-29 13:16:58 -0800
commit75142b0a63279bac1e0b276edbf48ba3cea62862 (patch)
treed6f816be0a1053f3645519e23f9561153d1ec2ec
parentf74308bed40e2d463d8b4ed5e57dc56220b65bcc (diff)
downloadsubsurface-75142b0a63279bac1e0b276edbf48ba3cea62862.tar.gz
cleanup: less than operators shall not use equal
See also commit c032006d91ee3c. Compare functions passed to sort functions need to compare for less-than and not less-or-equal. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
-rw-r--r--desktop-widgets/preferences/preferencesdialog.cpp2
-rw-r--r--qt-models/diveplannermodel.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/preferences/preferencesdialog.cpp b/desktop-widgets/preferences/preferencesdialog.cpp
index 50a0049ac..49b1f87bd 100644
--- a/desktop-widgets/preferences/preferencesdialog.cpp
+++ b/desktop-widgets/preferences/preferencesdialog.cpp
@@ -90,7 +90,7 @@ void PreferencesDialog::buttonClicked(QAbstractButton* btn)
bool abstractpreferenceswidget_lessthan(AbstractPreferencesWidget *p1, AbstractPreferencesWidget *p2)
{
- return p1->positionHeight() <= p2->positionHeight();
+ return p1->positionHeight() < p2->positionHeight();
}
void PreferencesDialog::addPreferencePage(AbstractPreferencesWidget *page)
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 8efb3473c..31c98bac7 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -659,7 +659,7 @@ void DivePlannerPointsModel::setStartTime(const QTime &t)
bool divePointsLessThan(const divedatapoint &p1, const divedatapoint &p2)
{
- return p1.time <= p2.time;
+ return p1.time < p2.time;
}
int DivePlannerPointsModel::lastEnteredPoint()