summaryrefslogtreecommitdiff
path: root/src/pcm/Clamp.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-10-30 00:06:48 +0100
committerMax Kellermann <max@musicpd.org>2018-10-30 00:08:25 +0100
commit804ccddf7e08b7bac5121ed2b6f8c7fb9e5f3ed6 (patch)
treed9b0db3eec9337939908bf06cfd0b408a37dba5e /src/pcm/Clamp.hxx
parentbb5918932b900a42a413fee5d4764446f5ab2669 (diff)
pcm/Clamp: convert to `constexpr`
Diffstat (limited to 'src/pcm/Clamp.hxx')
-rw-r--r--src/pcm/Clamp.hxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pcm/Clamp.hxx b/src/pcm/Clamp.hxx
index 2461ba2a9..6d94f3b7c 100644
--- a/src/pcm/Clamp.hxx
+++ b/src/pcm/Clamp.hxx
@@ -34,8 +34,7 @@ template<SampleFormat F> struct SampleTraits;
* and caps it if necessary.
*/
template<SampleFormat F, class Traits=SampleTraits<F>>
-gcc_const
-static inline typename Traits::value_type
+constexpr typename Traits::value_type
PcmClamp(typename Traits::long_type x) noexcept
{
typedef typename Traits::value_type T;