From 7d8e94444d989d0ac4a4055b207726708e9ec0da Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 11 Jan 2018 08:47:15 +0200 Subject: convert ab?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins Reviewed-by: Noel Grandin --- slideshow/source/engine/opengl/TransitionImpl.cxx | 4 ++-- slideshow/source/engine/transitions/spiralwipe.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'slideshow') diff --git a/slideshow/source/engine/opengl/TransitionImpl.cxx b/slideshow/source/engine/opengl/TransitionImpl.cxx index bb6557f4638f..927e0d72130d 100644 --- a/slideshow/source/engine/opengl/TransitionImpl.cxx +++ b/slideshow/source/engine/opengl/TransitionImpl.cxx @@ -1094,9 +1094,9 @@ float fdiv(int a, int b) glm::vec2 vec(float x, float y, float nx, float ny) { x = x < 0.0 ? 0.0 : x; - x = x > nx ? nx : x; + x = std::min(x, nx); y = y < 0.0 ? 0.0 : y; - y = y > ny ? ny : y; + y = std::min(y, ny); return glm::vec2(fdiv(x, nx), fdiv(y, ny)); } diff --git a/slideshow/source/engine/transitions/spiralwipe.cxx b/slideshow/source/engine/transitions/spiralwipe.cxx index 216c513ff470..6ecad1712ed4 100644 --- a/slideshow/source/engine/transitions/spiralwipe.cxx +++ b/slideshow/source/engine/transitions/spiralwipe.cxx @@ -58,7 +58,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis ) sal_Int32 len = static_cast( (e - (edge /2)) * edge1 * 4 ); double w = M_PI_2; while (len > 0) { - const sal_Int32 alen = (len > edge1 ? edge1 : len); + const sal_Int32 alen = std::min(len, edge1); len -= alen; poly = createUnitRect(); aTransform = basegfx::utils::createScaleB2DHomMatrix( -- cgit