Use of clamp

This commit is contained in:
conde2
2013-12-01 00:48:36 -02:00
parent 7ff73d1064
commit 4dcb30110f
9 changed files with 13 additions and 10 deletions

View File

@@ -89,7 +89,7 @@ bool AdaptativeFrameCounter::update()
void AdaptativeFrameCounter::setMaxFps(int maxFps)
{
maxFps = std::max<int>(std::min<int>(maxFps, 1000), 0);
maxFps = stdext::clamp<int>(maxFps, 0, 1000);
if(maxFps != 0) {
m_bestFrameDelay = 1000000 / maxFps;