From 7b709a5ee374595af4a25bc24530081558358d2f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 15 Aug 2023 07:26:14 -0700 Subject: Use an array of bytes instead of ints for small values --- al/debug.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'al/debug.cpp') diff --git a/al/debug.cpp b/al/debug.cpp index 62e88914..f5914767 100644 --- a/al/debug.cpp +++ b/al/debug.cpp @@ -294,9 +294,9 @@ FORCE_ALIGN void AL_APIENTRY alDebugMessageControlDirectEXT(ALCcontext *context, return context->setError(AL_INVALID_ENUM, "Invalid debug enable %d", enable); static constexpr size_t ElemCount{DebugSourceCount + DebugTypeCount + DebugSeverityCount}; - static constexpr auto Values = make_array_sequence(); + static constexpr auto Values = make_array_sequence(); - al::span srcIndices{al::span{Values}.subspan()}; + auto srcIndices = al::span{Values}.subspan(DebugSourceBase,DebugSourceCount); if(source != AL_DONT_CARE_EXT) { auto dsource = GetDebugSource(source); @@ -305,7 +305,7 @@ FORCE_ALIGN void AL_APIENTRY alDebugMessageControlDirectEXT(ALCcontext *context, srcIndices = srcIndices.subspan(al::to_underlying(*dsource), 1); } - al::span typeIndices{al::span{Values}.subspan()}; + auto typeIndices = al::span{Values}.subspan(DebugTypeBase,DebugTypeCount); if(type != AL_DONT_CARE_EXT) { auto dtype = GetDebugType(type); @@ -314,7 +314,7 @@ FORCE_ALIGN void AL_APIENTRY alDebugMessageControlDirectEXT(ALCcontext *context, typeIndices = typeIndices.subspan(al::to_underlying(*dtype), 1); } - al::span svrIndices{al::span{Values}.subspan()}; + auto svrIndices = al::span{Values}.subspan(DebugSeverityBase,DebugSeverityCount); if(severity != AL_DONT_CARE_EXT) { auto dseverity = GetDebugSeverity(severity); -- cgit v1.2.3