From 922b93311e4b79997c61ed457ca89ed13366ecd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 21 Apr 2013 12:44:29 +0200 Subject: [PATCH] Don't use `constexpr` in Timeline. There is no point in using this class at compile-time. Ever. Moreover clang called through Emscripten complains that it cannot be constexpr. Clang called normally doesn't complain, don't know why. --- src/Timeline.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Timeline.h b/src/Timeline.h index 807ce0672..fa17f0af8 100644 --- a/src/Timeline.h +++ b/src/Timeline.h @@ -86,12 +86,10 @@ class MAGNUM_EXPORT Timeline { * Creates stopped timeline. * @see start() */ - inline constexpr explicit Timeline(): _minimalFrameTime(0), _previousFrameDuration(0), running(false) {} + inline explicit Timeline(): _minimalFrameTime(0), _previousFrameDuration(0), running(false) {} /** @brief Minimal frame time (in seconds) */ - inline constexpr Float minimalFrameTime() const { - return _minimalFrameTime; - } + inline Float minimalFrameTime() const { return _minimalFrameTime; } /** * @brief Set minimal frame time @@ -141,9 +139,7 @@ class MAGNUM_EXPORT Timeline { * * If the timeline is stopped, the function returns `0.0f`. */ - inline constexpr Float previousFrameDuration() const { - return _previousFrameDuration; - } + inline Float previousFrameDuration() const { return _previousFrameDuration; } private: std::chrono::high_resolution_clock::time_point _startTime;