aboutsummaryrefslogtreecommitdiffstats
path: root/al/debug.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-08-15 07:26:14 -0700
committerChris Robinson <[email protected]>2023-08-15 07:26:14 -0700
commit7b709a5ee374595af4a25bc24530081558358d2f (patch)
tree8b9a2b3417e3f2a52903802e25ae7633955c5a9f /al/debug.cpp
parent2b05b61a4a941280391e7b97e1b6b423e4dae6e2 (diff)
Use an array of bytes instead of ints for small values
Diffstat (limited to 'al/debug.cpp')
-rw-r--r--al/debug.cpp8
1 files changed, 4 insertions, 4 deletions
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<uint,ElemCount>();
+ static constexpr auto Values = make_array_sequence<uint8_t,ElemCount>();
- al::span<const uint> srcIndices{al::span{Values}.subspan<DebugSourceBase,DebugSourceCount>()};
+ 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<const uint> typeIndices{al::span{Values}.subspan<DebugTypeBase,DebugTypeCount>()};
+ 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<const uint> svrIndices{al::span{Values}.subspan<DebugSeverityBase,DebugSeverityCount>()};
+ auto svrIndices = al::span{Values}.subspan(DebugSeverityBase,DebugSeverityCount);
if(severity != AL_DONT_CARE_EXT)
{
auto dseverity = GetDebugSeverity(severity);