Remove constexpr from a function

Various versions of GCC have a problem with it, and it doesn't really add much
benefit anyway.
This commit is contained in:
Chris Robinson 2021-01-17 23:39:33 -08:00
parent 8ebf146c72
commit c3380d4201

View File

@ -209,7 +209,7 @@ void RemoveActiveEffectSlots(const al::span<ALeffectslot*> 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;
}