summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pcm/SampleFormat.cxx2
-rw-r--r--src/pcm/SampleFormat.hxx7
-rw-r--r--src/pcm/Volume.cxx1
3 files changed, 5 insertions, 5 deletions
diff --git a/src/pcm/SampleFormat.cxx b/src/pcm/SampleFormat.cxx
index 7968e69b7..5d477115a 100644
--- a/src/pcm/SampleFormat.cxx
+++ b/src/pcm/SampleFormat.cxx
@@ -19,6 +19,8 @@
#include "SampleFormat.hxx"
+#include <assert.h>
+
const char *
sample_format_to_string(SampleFormat format)
{
diff --git a/src/pcm/SampleFormat.hxx b/src/pcm/SampleFormat.hxx
index e5b4c5985..25e6352b6 100644
--- a/src/pcm/SampleFormat.hxx
+++ b/src/pcm/SampleFormat.hxx
@@ -22,7 +22,6 @@
#include "Compiler.h"
-#include <assert.h>
#include <stdint.h>
#if defined(WIN32) && GCC_CHECK_VERSION(4,6)
@@ -65,7 +64,7 @@ enum class SampleFormat : uint8_t {
/**
* Checks whether the sample format is valid.
*/
-static inline bool
+static constexpr inline bool
audio_valid_sample_format(SampleFormat format)
{
switch (format) {
@@ -84,8 +83,7 @@ audio_valid_sample_format(SampleFormat format)
return false;
}
-gcc_const
-static inline unsigned
+static constexpr inline unsigned
sample_format_size(SampleFormat format)
{
switch (format) {
@@ -108,7 +106,6 @@ sample_format_size(SampleFormat format)
return 0;
}
- assert(false);
gcc_unreachable();
}
diff --git a/src/pcm/Volume.cxx b/src/pcm/Volume.cxx
index 41def6dd0..761fd048d 100644
--- a/src/pcm/Volume.cxx
+++ b/src/pcm/Volume.cxx
@@ -27,6 +27,7 @@
#include "PcmDither.cxx" // including the .cxx file to get inlined templates
+#include <assert.h>
#include <stdint.h>
#include <string.h>