aboutsummaryrefslogtreecommitdiff
path: root/src/PcmUtils.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/PcmUtils.hxx')
-rw-r--r--src/PcmUtils.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PcmUtils.hxx b/src/PcmUtils.hxx
index d05b8a69..7c7173d8 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");