From 87afc8c250ba6868c2374ad2a3e0a9374e8f0c1a Mon Sep 17 00:00:00 2001 From: Felix Dick Date: Mon, 26 Sep 2022 21:10:24 +0200 Subject: Replace clamp with max if there is no upper bound. --- src/helpers/AnimatedVariable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/helpers/AnimatedVariable.cpp') 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::system_clock::now() - animationBegin).count(), 0, INT_MAX); + return std::max((int)(m_pConfig->pValues->internalSpeed * 100) - (int)std::chrono::duration_cast(std::chrono::system_clock::now() - animationBegin).count(), 0); } -- cgit v1.2.3