diff options
author | Bogdan Buzea <buzea.bogdan@libreoffice.org> | 2024-03-22 20:07:40 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-03-26 17:26:53 +0100 |
commit | b0f26f460c8f9afceaaf0aa26de3ebfa1bf2cefa (patch) | |
tree | e1cd3dfcd186d961c3c1021bfffd1e090509ce7b /basegfx/source/tools/bgradient.cxx | |
parent | 0321606599065a24c9cfa5c86d1cfcfbe58d11ae (diff) |
tdf#160084 Simplify comparison for basegfx::fTools
Change-Id: If1a2d000e7059856280bd1acb959b35c412777df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165184
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx/source/tools/bgradient.cxx')
-rw-r--r-- | basegfx/source/tools/bgradient.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/basegfx/source/tools/bgradient.cxx b/basegfx/source/tools/bgradient.cxx index ffa75a898c53..9f98c54cfc1c 100644 --- a/basegfx/source/tools/bgradient.cxx +++ b/basegfx/source/tools/bgradient.cxx @@ -332,13 +332,13 @@ void BColorStops::sortAndCorrect() // get offset of entry at read position double fOff((*this)[read].getStopOffset()); - if (basegfx::fTools::less(fOff, 0.0) && read + 1 < size()) + if (fOff < 0.0 && read + 1 < size()) { // value < 0.0 and we have a next entry. check for gradient snippet // containing 0.0 resp. StartColor const double fOff2((*this)[read + 1].getStopOffset()); - if (basegfx::fTools::more(fOff2, 0.0)) + if (fOff2 > 0.0) { // read is the start of a gradient snippet containing 0.0. Correct // entry to StartColor, interpolate to correct StartColor @@ -353,7 +353,7 @@ void BColorStops::sortAndCorrect() } // step over < 0 values, these are outside and will be removed - if (basegfx::fTools::less(fOff, 0.0)) + if (fOff < 0.0) { continue; } @@ -410,7 +410,7 @@ void BColorStops::sortAndCorrect() // no valid entries at all, but not empty. This can only happen // when all entries are below 0.0 or above 1.0 (else a gradient // snippet spawning over both would have been detected) - if (basegfx::fTools::less(back().getStopOffset(), 0.0)) + if (back().getStopOffset() < 0.0) { // all outside too low, rescue last due to being closest to content const BColor aBackColor(back().getStopColor()); |