diff options
| author | Felix Dick <felix.dick@web.de> | 2022-09-26 21:10:24 +0200 |
|---|---|---|
| committer | Felix Dick <felix.dick@web.de> | 2022-09-26 21:10:24 +0200 |
| commit | 87afc8c250ba6868c2374ad2a3e0a9374e8f0c1a (patch) | |
| tree | b72b7df6c61f380811668416366d8133116d9129 /src/helpers/AnimatedVariable.cpp | |
| parent | f70b57f360f8117ecca67d6d7f75c1f87b098794 (diff) | |
Replace clamp with max if there is no upper bound.
Diffstat (limited to 'src/helpers/AnimatedVariable.cpp')
| -rw-r--r-- | src/helpers/AnimatedVariable.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helpers/AnimatedVariable.cpp b/src/helpers/AnimatedVariable.cpp index 7860fb8f..573844aa 100644 --- a/src/helpers/AnimatedVariable.cpp +++ b/src/helpers/AnimatedVariable.cpp @@ -59,5 +59,5 @@ void CAnimatedVariable::unregister() { } int CAnimatedVariable::getDurationLeftMs() { - return std::clamp((int)(m_pConfig->pValues->internalSpeed * 100) - (int)std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() - animationBegin).count(), 0, INT_MAX); + return std::max((int)(m_pConfig->pValues->internalSpeed * 100) - (int)std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() - animationBegin).count(), 0); } |
