summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-10 20:43:21 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-11 12:35:40 -0800
commit6ea6a4305c35f812985cb55dd32a1577d824fcfb (patch)
tree7ca3aebb72499f75c48bf0469139430d0c9bb820 /qt-ui/profile
parent2bd2df0349154b83f2125da70d4c581ac2c04534 (diff)
downloadsubsurface-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/profile')
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index 9a4966fef..c780b7a63 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -42,7 +42,7 @@ double DiveCartesianAxis::tickSize() const
void DiveCartesianAxis::setMaximum(double maximum)
{
- if (max == maximum)
+ if (IS_FP_SAME(max, maximum))
return;
max = maximum;
emit maxChanged();
@@ -50,7 +50,7 @@ void DiveCartesianAxis::setMaximum(double maximum)
void DiveCartesianAxis::setMinimum(double minimum)
{
- if (min == minimum)
+ if (IS_FP_SAME(min, minimum))
return;
min = minimum;
}
@@ -348,7 +348,7 @@ QLineF DiveCartesianPlane::horizontalLine() const
void DiveCartesianPlane::setHorizontalLine(QLineF line)
{
- if ( horizontalSize == line.length())
+ if (IS_FP_SAME(horizontalSize, line.length()))
return;
horizontalSize = line.length();
setup();
@@ -356,7 +356,7 @@ void DiveCartesianPlane::setHorizontalLine(QLineF line)
void DiveCartesianPlane::setVerticalLine(QLineF line)
{
- if (verticalSize == line.length())
+ if (IS_FP_SAME(verticalSize, line.length()))
return;
verticalSize = line.length();
setup();
@@ -439,7 +439,7 @@ void PartialGasPressureAxis::preferencesChanged()
max = model->po2Max();
qreal pp = floor(max * 10.0) / 10.0 + 0.2;
- if (maximum() == pp)
+ if (IS_FP_SAME(maximum(), pp))
return;
setMaximum(pp);