diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-22 12:54:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-22 16:45:11 +0100 |
commit | 73ffc462b9b7b1e48470c17d6fbffda66be76e67 (patch) | |
tree | b8a1917508d9af9b0a975b660fbe852281dd9f84 /basegfx | |
parent | d7f3eed145fa8220bb34de1f21403d80b2b3f5ae (diff) |
coverity#1326120 try and silence Constant expression result
Change-Id: Iafd034dd51135ad99f56279ceee1c770f91436b0
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/curve/b2dcubicbezier.cxx | 4 | ||||
-rw-r--r-- | basegfx/source/polygon/b2dpolygoncutandtouch.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx index bbafb7bbfa0d..ee87cbe7256b 100644 --- a/basegfx/source/curve/b2dcubicbezier.cxx +++ b/basegfx/source/curve/b2dcubicbezier.cxx @@ -446,7 +446,7 @@ namespace basegfx : aVecA.getY() / aEdge.getY()); // relative end point of vector in edge range? - if(fTools::moreOrEqual(fScale, 0.0) && fTools::lessOrEqual(fScale, 1.0)) + if (fTools::betweenOrEqualEither(fScale, 0.0, 1.0)) { bAIsTrivial = true; } @@ -468,7 +468,7 @@ namespace basegfx : aVecB.getY() / aEdge.getY()); // end point of vector in edge range? Caution: controlB is directed AGAINST edge - if(fTools::lessOrEqual(fScale, 0.0) && fTools::moreOrEqual(fScale, -1.0)) + if (fTools::betweenOrEqualEither(fScale, -1.0, 0.0)) { bBIsTrivial = true; } diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx index 25b05307f213..0ccebe9fb38d 100644 --- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx +++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx @@ -229,7 +229,7 @@ namespace basegfx const double fOne(1.0); fCut = (aVecB.getY() * (rCurrB.getX() - rCurrA.getX()) + aVecB.getX() * (rCurrA.getY() - rCurrB.getY())) / fCut; - if(fTools::moreOrEqual(fCut, fZero) && fTools::lessOrEqual(fCut, fOne)) + if (fTools::betweenOrEqualEither(fCut, fZero, fOne)) { // it's a candidate, but also need to test parameter value of cut on line 2 double fCut2; @@ -244,7 +244,7 @@ namespace basegfx fCut2 = (rCurrA.getY() + (fCut * aVecA.getY()) - rCurrB.getY()) / aVecB.getY(); } - if(fTools::moreOrEqual(fCut2, fZero) && fTools::lessOrEqual(fCut2, fOne)) + if (fTools::betweenOrEqualEither(fCut2, fZero, fOne)) { // cut is in range, add point. Two edges can have only one cut, but // add a cut point to each list. The lists may be the same for |