diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-02-10 20:43:21 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-11 12:35:40 -0800 |
commit | 6ea6a4305c35f812985cb55dd32a1577d824fcfb (patch) | |
tree | 7ca3aebb72499f75c48bf0469139430d0c9bb820 /qt-ui/diveplanner.cpp | |
parent | 2bd2df0349154b83f2125da70d4c581ac2c04534 (diff) | |
download | subsurface-6ea6a4305c35f812985cb55dd32a1577d824fcfb.tar.gz |
Use our macro for FP comparisons
I think that catches all the ones we missed (thanks clang -Wfloat-equal).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index d75e065b8..33cb80ff9 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -246,7 +246,7 @@ void DivePlannerGraphics::keyLeftAction() double xpos = timeLine->posAtValue((dp.time - 60) / 60); bool nextStep = false; Q_FOREACH(DiveHandler *h, handles) { - if (h->pos().x() == xpos) { + if (IS_FP_SAME(h->pos().x(), xpos)) { nextStep = true; break; } @@ -274,7 +274,7 @@ void DivePlannerGraphics::keyRightAction() double xpos = timeLine->posAtValue((dp.time + 60) / 60); bool nextStep = false; Q_FOREACH(DiveHandler *h, handles) { - if (h->pos().x() == xpos) { + if (IS_FP_SAME(h->pos().x(), xpos)) { nextStep = true; break; } |