aboutsummaryrefslogtreecommitdiffstats
path: root/src/Timer.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 21:53:19 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 21:53:19 +0200
commit58502b38d3eaf5649c9e09b6af6ea84d726dccd1 (patch)
treeb9bbcf6711b783ceba4aac6259e1cb7c66293ec4 /src/Timer.cxx
parentd44880dfa99197a8c1f4b65416470e6ffbe534f6 (diff)
downloadmpd-58502b38d3eaf5649c9e09b6af6ea84d726dccd1.tar.gz
mpd-58502b38d3eaf5649c9e09b6af6ea84d726dccd1.tar.xz
mpd-58502b38d3eaf5649c9e09b6af6ea84d726dccd1.zip
*: use std::numeric_limits
Diffstat (limited to '')
-rw-r--r--src/Timer.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Timer.cxx b/src/Timer.cxx
index e32ebe04b..8a1718fbf 100644
--- a/src/Timer.cxx
+++ b/src/Timer.cxx
@@ -24,6 +24,8 @@
#include <glib.h>
+#include <limits>
+
#include <assert.h>
#include <limits.h>
#include <stddef.h>
@@ -62,8 +64,8 @@ unsigned Timer::GetDelay() const
if (delay < 0)
return 0;
- if (delay > G_MAXINT)
- delay = G_MAXINT;
+ if (delay > std::numeric_limits<int>::max())
+ delay = std::numeric_limits<int>::max();
return delay;
}