summaryrefslogtreecommitdiff
path: root/slideshow
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 /slideshow
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 'slideshow')
-rw-r--r--slideshow/source/engine/activities/activitybase.cxx5
-rw-r--r--slideshow/source/engine/animationnodes/animationbasenode.cxx3
-rw-r--r--slideshow/source/engine/shapes/viewshape.cxx4
3 files changed, 6 insertions, 6 deletions
diff --git a/slideshow/source/engine/activities/activitybase.cxx b/slideshow/source/engine/activities/activitybase.cxx
index 4ee7c84bcc72..1050bc033322 100644
--- a/slideshow/source/engine/activities/activitybase.cxx
+++ b/slideshow/source/engine/activities/activitybase.cxx
@@ -19,7 +19,8 @@
#include <sal/config.h>
-#include <o3tl/clamp.hxx>
+#include <algorithm>
+
#include <tools/diagnose_ex.h>
#include <canvas/canvastools.hxx>
@@ -148,7 +149,7 @@ namespace slideshow
// ================================
// clamp nT to permissible [0,1] range
- nT = o3tl::clamp( nT, 0.0, 1.0 );
+ nT = std::clamp( nT, 0.0, 1.0 );
// take acceleration/deceleration into account. if the sum
// of mnAccelerationFraction and mnDecelerationFraction
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index 0b7dae6bc70b..a1b92517e549 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -20,7 +20,6 @@
#include <cppuhelper/exc_hlp.hxx>
#include <comphelper/anytostring.hxx>
-#include <o3tl/clamp.hxx>
#include <sal/log.hxx>
#include <com/sun/star/presentation/ParagraphTarget.hpp>
#include <com/sun/star/animations/Timing.hpp>
@@ -448,7 +447,7 @@ AnimationBaseNode::fillCommonParameters() const
// Calculate the minimum frame count that depends on the duration and
// the minimum frame count.
- const sal_Int32 nMinFrameCount (o3tl::clamp<sal_Int32>(
+ const sal_Int32 nMinFrameCount (std::clamp<sal_Int32>(
basegfx::fround(nDuration * FrameRate::MinimumFramesPerSecond), 1, 10));
return ActivitiesFactory::CommonParameters(
diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx
index 2ab95b9267c0..b89804000ebd 100644
--- a/slideshow/source/engine/shapes/viewshape.cxx
+++ b/slideshow/source/engine/shapes/viewshape.cxx
@@ -19,9 +19,9 @@
#include <sal/config.h>
-#include <o3tl/clamp.hxx>
#include <tools/diagnose_ex.h>
+#include <algorithm>
#include <math.h>
#include <rtl/math.hxx>
@@ -436,7 +436,7 @@ namespace slideshow
if( mbForceUpdate || (nUpdateFlags & UpdateFlags::Alpha) )
{
mpSprite->setAlpha( (pAttr && pAttr->isAlphaValid()) ?
- o3tl::clamp(pAttr->getAlpha(),
+ std::clamp(pAttr->getAlpha(),
0.0,
1.0) :
1.0 );