diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2019-06-16 23:13:02 +0200 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2019-06-16 23:13:02 +0200 |
commit | a4d6ed761db2945a9c74c9abd8cb8c1472daacfe (patch) | |
tree | a3511dfec2bef52b5ecc50aa39be5e27d725c4a7 | |
parent | d0563115226fd735248d12617a6eefb5273f4e86 (diff) |
Fix compiler warning and make operator SINT() a constexpr
-rw-r--r-- | src/analyzer/constants.h | 2 | ||||
-rw-r--r-- | src/util/audiosignal.h | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/analyzer/constants.h b/src/analyzer/constants.h index 4ea46f7149..1170c487f7 100644 --- a/src/analyzer/constants.h +++ b/src/analyzer/constants.h @@ -11,7 +11,7 @@ namespace mixxx { // fixed number of channels like the engine does, usually 2 = stereo. constexpr mixxx::AudioSignal::ChannelCount kAnalysisChannels = mixxx::kEngineChannelCount; constexpr SINT kAnalysisFramesPerBlock = 4096; -const SINT kAnalysisSamplesPerBlock = +constexpr SINT kAnalysisSamplesPerBlock = kAnalysisFramesPerBlock * kAnalysisChannels; // Only analyze the first minute in fast-analysis mode. diff --git a/src/util/audiosignal.h b/src/util/audiosignal.h index 85ddfa3bfd..754157d2d5 100644 --- a/src/util/audiosignal.h +++ b/src/util/audiosignal.h @@ -61,8 +61,7 @@ public: return (kValueMin <= m_value) && (m_value <= kValueMax); } - /*implicit*/ operator SINT() const { - DEBUG_ASSERT(m_value >= 0); // unsigned value + /*implicit*/ constexpr operator SINT() const { return m_value; } @@ -106,8 +105,7 @@ public: return (kValueMin <= m_value) && (m_value <= kValueMax); } - /*implicit*/ operator SINT() const { - DEBUG_ASSERT(m_value >= 0); // unsigned value + /*implicit*/ constexpr operator SINT() const { return m_value; } |