aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PcmUtils.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PcmUtils.hxx b/src/PcmUtils.hxx
index d05b8a698..7c7173d8c 100644
--- a/src/PcmUtils.hxx
+++ b/src/PcmUtils.hxx
@@ -71,8 +71,8 @@ gcc_const
static inline T
PcmClamp(U x)
{
- constexpr U MIN_VALUE = -(1 << (bits - 1));
- constexpr U MAX_VALUE = (1 << (bits - 1)) - 1;
+ constexpr U MIN_VALUE = -(U(1) << (bits - 1));
+ constexpr U MAX_VALUE = (U(1) << (bits - 1)) - 1;
typedef std::numeric_limits<T> limits;
static_assert(MIN_VALUE >= limits::min(), "out of range");