summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-05-17 11:28:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-05-17 21:03:12 +0200
commit649313625b94e6b879848fc19b607b74375100bf (patch)
treedaa8993fe967cbfdad18aabac1635f7ded1977c2 /slideshow
parent3a667101987ccbc75024942d779c8c62a4d0a296 (diff)
New o3tl::temporary to simplify calls of std::modf
...that ignore the out-parameter integral part Change-Id: I05f07c1a8909023232f8aecf75ea5541d4eb81ca Reviewed-on: https://gerrit.libreoffice.org/54474 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/transitions/snakewipe.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/slideshow/source/engine/transitions/snakewipe.cxx b/slideshow/source/engine/transitions/snakewipe.cxx
index b484f36cb8d7..2fd53e121494 100644
--- a/slideshow/source/engine/transitions/snakewipe.cxx
+++ b/slideshow/source/engine/transitions/snakewipe.cxx
@@ -21,6 +21,7 @@
#include <cmath>
+#include <o3tl/temporary.hxx>
#include <osl/diagnose.h>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/point/b2dpoint.hxx>
@@ -102,8 +103,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis )
res.append(poly);
}
const double a = (M_SQRT1_2 / m_sqrtElements);
- double dummy;
- const double d = std::modf(sqrtArea2, &dummy);
+ const double d = std::modf(sqrtArea2, &o3tl::temporary(double()));
const double len = (t * M_SQRT2 * d);
const double height = ::basegfx::pruneScaleValue( M_SQRT1_2 / m_sqrtElements );
poly.clear();
@@ -147,8 +147,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis )
res.append(poly);
}
const double a = (M_SQRT1_2 / m_sqrtElements);
- double dummy;
- const double d = std::modf(sqrtArea2, &dummy);
+ const double d = std::modf(sqrtArea2, &o3tl::temporary(double()));
const double len = ((1.0 - t) * M_SQRT2 * d);
const double height = ::basegfx::pruneScaleValue( M_SQRT1_2 / m_sqrtElements );
poly.clear();