diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-01 14:55:56 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-12 22:06:33 -0400 |
commit | 3cf25730c3fcd4df464f0fe73f4421d922af15ec (patch) | |
tree | cbdce6f3ea69cca09fb2ea1dac8bcb40cb9219e6 /sw | |
parent | dff8da3420f92b71988e55aad1c4a9f7e9c30575 (diff) |
new loplugin fpcomparison
Find code that compares floating point values with == or !=
It should rather use rtl::math::approxEqual
Change-Id: I9026e08823340fa1d6a042c430515344c93215bd
Reviewed-on: https://gerrit.libreoffice.org/21997
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
(cherry picked from commit 4e9b528dccdfc438394b1ffe029f1fc8178a6086)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 675ef48be460..805aabeb6bc7 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -568,7 +568,7 @@ lcl_TryMergeBorderLine(BorderLinePrimitive2D const& rThis, { if (rThis.getStart().getX() == rOther.getStart().getX()) { - assert(rThis.getEnd().getX() == rOther.getEnd().getX()); + assert(rtl::math::approxEqual(rThis.getEnd().getX(), rOther.getEnd().getX())); nRet = lcl_TryMergeLines( make_pair(rThis.getStart().getY(), rThis.getEnd().getY()), make_pair(rOther.getStart().getY(),rOther.getEnd().getY()), @@ -579,7 +579,7 @@ lcl_TryMergeBorderLine(BorderLinePrimitive2D const& rThis, { if (rThis.getStart().getY() == rOther.getStart().getY()) { - assert(rThis.getEnd().getY() == rOther.getEnd().getY()); + assert(rtl::math::approxEqual(rThis.getEnd().getY(), rOther.getEnd().getY())); nRet = lcl_TryMergeLines( make_pair(rThis.getStart().getX(), rThis.getEnd().getX()), make_pair(rOther.getStart().getX(),rOther.getEnd().getX()), |