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>
This commit is contained in:
Dirk Hohndel 2014-02-10 20:43:21 -08:00
parent 2bd2df0349
commit 6ea6a4305c
3 changed files with 8 additions and 8 deletions

View file

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