Browse Source

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.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
922b93311e
  1. 10
      src/Timeline.h

10
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;

Loading…
Cancel
Save