Browse Source

Animation: minor cleanup.

inverted-ranges
Vladimír Vondruš 8 years ago
parent
commit
03ee1c6fe8
  1. 4
      src/Magnum/Animation/Player.hpp

4
src/Magnum/Animation/Player.hpp

@ -195,14 +195,14 @@ template<class T, class K> Containers::Optional<std::pair<UnsignedInt, K>> playe
std::chrono::duration doesn't have operator bool, so I need to compare std::chrono::duration doesn't have operator bool, so I need to compare
to default-constructed value. Ugh. */ to default-constructed value. Ugh. */
if(state == State::Paused && (stopPauseTime != T{})) { if(state == State::Paused && stopPauseTime != T{}) {
startTime = stopPauseTime - startTime; startTime = stopPauseTime - startTime;
timeToUse = startTime; timeToUse = startTime;
stopPauseTime = {}; stopPauseTime = {};
/* The animation was stopped by the user right before this iteration, /* The animation was stopped by the user right before this iteration,
"park" the animation to the initial time */ "park" the animation to the initial time */
} else if(state == State::Stopped && (stopPauseTime != T{})) { } else if(state == State::Stopped && stopPauseTime != T{}) {
timeToUse = {}; timeToUse = {};
startTime = {}; startTime = {};
stopPauseTime = {}; stopPauseTime = {};

Loading…
Cancel
Save