aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-05 06:46:00 -0700
committerChris Robinson <[email protected]>2023-05-05 06:46:00 -0700
commit3ec03cadd2b5059e54e5e9b8f4d506b4c6ce727d (patch)
tree623b8e96f8acca9d55fb96b74e8d832877b27451 /al
parentc14ca5f3aa6da354440a60656062f6bc68d6fca6 (diff)
Use deduction guides instead of helper functions for spans
Diffstat (limited to 'al')
-rw-r--r--al/debug.cpp8
-rw-r--r--al/eax/call.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/al/debug.cpp b/al/debug.cpp
index 3df85d62..a4b66ffb 100644
--- a/al/debug.cpp
+++ b/al/debug.cpp
@@ -311,7 +311,7 @@ FORCE_ALIGN void AL_APIENTRY alDebugMessageControlEXT(ALenum source, ALenum type
static constexpr size_t ElemCount{DebugSourceCount + DebugTypeCount + DebugSeverityCount};
static constexpr auto Values = make_array<uint,ElemCount>();
- al::span<const uint> srcIndices{al::as_span(Values).subspan<DebugSourceBase,DebugSourceCount>()};
+ al::span<const uint> srcIndices{al::span{Values}.subspan<DebugSourceBase,DebugSourceCount>()};
if(source != AL_DONT_CARE_EXT)
{
auto dsource = GetDebugSource(source);
@@ -320,7 +320,7 @@ FORCE_ALIGN void AL_APIENTRY alDebugMessageControlEXT(ALenum source, ALenum type
srcIndices = srcIndices.subspan(al::to_underlying(*dsource), 1);
}
- al::span<const uint> typeIndices{al::as_span(Values).subspan<DebugTypeBase,DebugTypeCount>()};
+ al::span<const uint> typeIndices{al::span{Values}.subspan<DebugTypeBase,DebugTypeCount>()};
if(type != AL_DONT_CARE_EXT)
{
auto dtype = GetDebugType(type);
@@ -329,7 +329,7 @@ FORCE_ALIGN void AL_APIENTRY alDebugMessageControlEXT(ALenum source, ALenum type
typeIndices = typeIndices.subspan(al::to_underlying(*dtype), 1);
}
- al::span<const uint> svrIndices{al::as_span(Values).subspan<DebugSeverityBase,DebugSeverityCount>()};
+ al::span<const uint> svrIndices{al::span{Values}.subspan<DebugSeverityBase,DebugSeverityCount>()};
if(severity != AL_DONT_CARE_EXT)
{
auto dseverity = GetDebugSeverity(severity);
@@ -344,7 +344,7 @@ FORCE_ALIGN void AL_APIENTRY alDebugMessageControlEXT(ALenum source, ALenum type
{
const uint filterbase{(1u<<srcIndices[0]) | (1u<<typeIndices[0])};
- for(const uint id : al::as_span(ids, static_cast<uint>(count)))
+ for(const uint id : al::span{ids, static_cast<uint>(count)})
{
const uint64_t filter{filterbase | (uint64_t{id} << 32)};
diff --git a/al/eax/call.h b/al/eax/call.h
index 5ec33b0f..f2ad529e 100644
--- a/al/eax/call.h
+++ b/al/eax/call.h
@@ -55,7 +55,7 @@ public:
fail_too_small();
const auto count = minz(mPropertyBufferSize / sizeof(TValue), max_count);
- return al::as_span(static_cast<TValue*>(mPropertyBuffer), count);
+ return {static_cast<TValue*>(mPropertyBuffer), count};
}
template<typename TValue>