From d8e7a3b2457cde49deb2f88ff1070ce54000f659 Mon Sep 17 00:00:00 2001 From: Bogdan Buzea Date: Tue, 19 Nov 2024 16:55:33 +0100 Subject: [PATCH] tdf#160084 Simplify comparison for basegfx::fTools Change-Id: I8ef1df248d3ed9fbc804e53897ca934cce9683e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176779 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- drawinglayer/source/processor2d/hittestprocessor2d.cxx | 6 +++--- drawinglayer/source/processor3d/shadow3dextractor.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index 435bc7f804fe..d9b71b00e825 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -320,7 +320,7 @@ namespace drawinglayer::processor2d const primitive2d::PolygonStrokePrimitive2D& rPolygonCandidate(static_cast< const primitive2d::PolygonStrokePrimitive2D& >(rCandidate)); const attribute::LineAttribute& rLineAttribute = rPolygonCandidate.getLineAttribute(); - if(basegfx::fTools::more(rLineAttribute.getWidth(), 0.0)) + if(rLineAttribute.getWidth() > 0.0) { if(basegfx::B2DLineJoin::Miter == rLineAttribute.getLineJoin()) { @@ -357,13 +357,13 @@ namespace drawinglayer::processor2d double fLogicHitTolerance(0.0); // if WaveHeight, grow by it - if(basegfx::fTools::more(rPolygonCandidate.getWaveHeight(), 0.0)) + if(rPolygonCandidate.getWaveHeight() > 0.0) { fLogicHitTolerance += rPolygonCandidate.getWaveHeight(); } // if line width, grow by it - if(basegfx::fTools::more(rPolygonCandidate.getLineAttribute().getWidth(), 0.0)) + if(rPolygonCandidate.getLineAttribute().getWidth() > 0.0) { fLogicHitTolerance += rPolygonCandidate.getLineAttribute().getWidth() * 0.5; } diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx index d26d3219dfca..543787897bc3 100644 --- a/drawinglayer/source/processor3d/shadow3dextractor.cxx +++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx @@ -80,7 +80,7 @@ namespace drawinglayer::processor3d 0, // shadow3d doesn't have rPrimitive.getShadowBlur() yet. std::move(aNewSubList)); - if(basegfx::fTools::more(rPrimitive.getShadowTransparence(), 0.0)) + if(rPrimitive.getShadowTransparence() > 0.0) { // create simpleTransparencePrimitive, add created primitives primitive2d::Primitive2DContainer aNewTransPrimitiveVector { pNew };