diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-11-16 16:07:30 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-11-16 21:43:09 +0100 |
commit | 50d3ad9127aaf63afcfa299adcea060c9b09faa4 (patch) | |
tree | af3bf48ae8e31e180003c9f998831dd7777d1f5b /canvas/source/directx | |
parent | cd4a239063a77d49fe178255c20f0558e337a82f (diff) |
Instead of labs, use overloaded abs
...more likely to pick an appropriate version for the involved integer types,
esp. after the recent long -> tools::Long changes
Change-Id: Ia91259ca35aaf74b0e907de6831fc926f30057f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'canvas/source/directx')
-rw-r--r-- | canvas/source/directx/dx_canvashelper_texturefill.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx index f60dffb3b870..0bea70fc83a2 100644 --- a/canvas/source/directx/dx_canvashelper_texturefill.cxx +++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx @@ -19,6 +19,7 @@ #include <sal/config.h> +#include <cstdlib> #include <memory> #include <tuple> @@ -188,10 +189,10 @@ namespace dxcanvas int numColorSteps( const Gdiplus::Color& rColor1, const Gdiplus::Color& rColor2 ) { return std::max( - labs( rColor1.GetRed() - rColor2.GetRed() ), + std::abs( rColor1.GetRed() - rColor2.GetRed() ), std::max( - labs( rColor1.GetGreen() - rColor2.GetGreen() ), - labs( rColor1.GetBlue() - rColor2.GetBlue() ) ) ); + std::abs( rColor1.GetGreen() - rColor2.GetGreen() ), + std::abs( rColor1.GetBlue() - rColor2.GetBlue() ) ) ); } bool fillPolygonalGradient( const ::canvas::ParametricPolyPolygon::Values& rValues, |