From c3380d42011738ed91e356206532908403f337e4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 17 Jan 2021 23:39:33 -0800 Subject: Remove constexpr from a function Various versions of GCC have a problem with it, and it doesn't really add much benefit anyway. --- al/auxeffectslot.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index 9a319126..4af2acf2 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -209,7 +209,7 @@ void RemoveActiveEffectSlots(const al::span auxslots, ALCcontext } -constexpr EffectSlotType EffectSlotTypeFromEnum(ALenum type) +EffectSlotType EffectSlotTypeFromEnum(ALenum type) { switch(type) { @@ -231,12 +231,7 @@ constexpr EffectSlotType EffectSlotTypeFromEnum(ALenum type) case AL_EFFECT_DEDICATED_DIALOGUE: return EffectSlotType::DedicatedDialog; case AL_EFFECT_CONVOLUTION_REVERB_SOFT: return EffectSlotType::Convolution; } - /* GCC 5 doesn't like this in a constexpr function. Clang reports itself as - * GCC 4 or 5, so explicitly allow that. - */ -#if !defined(__GNUC__) || (__GNUC__ > 5) || defined(__clang__) ERR("Unhandled effect enum: 0x%04x\n", type); -#endif return EffectSlotType::None; } -- cgit v1.2.3