summaryrefslogtreecommitdiff
path: root/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-01-11 15:26:59 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-01-11 20:25:08 +0100
commit27cd397b1a1a8a39843c093eff68c5ea6cb249e7 (patch)
treeecf63804421b12987ae070a24a6ed967f29de1d8 /vcl/source/bitmap/BitmapSobelGreyFilter.cxx
parent5b19be032c51e0f7489b29c2c98e484587ed0865 (diff)
Drop o3tl/clamp.hxx, use C++17 std::clamp instead
Change-Id: I5043c787dcc3b78bc7fdff130564801194e39f46 Reviewed-on: https://gerrit.libreoffice.org/66177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source/bitmap/BitmapSobelGreyFilter.cxx')
-rw-r--r--vcl/source/bitmap/BitmapSobelGreyFilter.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/bitmap/BitmapSobelGreyFilter.cxx b/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
index 397d0e6d1d5c..5ce4987a26fd 100644
--- a/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
+++ b/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
@@ -10,7 +10,8 @@
#include <sal/config.h>
-#include <o3tl/clamp.hxx>
+#include <algorithm>
+
#include <vcl/bitmap.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/bitmapaccess.hxx>
@@ -119,7 +120,7 @@ BitmapEx BitmapSobelGreyFilter::execute(BitmapEx const& rBitmapEx) const
nSum1 = static_cast<long>(
sqrt(static_cast<double>(nSum1 * nSum1 + nSum2 * nSum2)));
- aGrey.SetIndex(~static_cast<sal_uInt8>(o3tl::clamp(nSum1, 0L, 255L)));
+ aGrey.SetIndex(~static_cast<sal_uInt8>(std::clamp(nSum1, 0L, 255L)));
pWriteAcc->SetPixelOnData(pScanline, nX, aGrey);
if (nX < (nWidth - 1))