From a231fd1c8afedbeb14b0bc77d76bad61db986059 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 2 May 2024 17:06:25 +1000 Subject: Replace cpp::span shim with std::span --- src/tasks/tasks.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/tasks/tasks.cpp') diff --git a/src/tasks/tasks.cpp b/src/tasks/tasks.cpp index aa382655..d3937c68 100644 --- a/src/tasks/tasks.cpp +++ b/src/tasks/tasks.cpp @@ -33,12 +33,12 @@ auto Name() -> std::pmr::string { } template -auto AllocateStack() -> cpp::span; +auto AllocateStack() -> std::span; // Decoders often require a very large amount of stack space, since they aren't // usually written with embedded use cases in mind. template <> -auto AllocateStack() -> cpp::span { +auto AllocateStack() -> std::span { constexpr std::size_t size = 20 * 1024; static StackType_t sStack[size]; return {sStack, size}; @@ -46,14 +46,14 @@ auto AllocateStack() -> cpp::span { // LVGL requires only a relatively small stack. Lua's stack is allocated // separately. template <> -auto AllocateStack() -> cpp::span { +auto AllocateStack() -> std::span { constexpr std::size_t size = 14 * 1024; static StackType_t sStack[size]; return {sStack, size}; } template <> // PCM conversion and resampling uses a very small amount of stack. -auto AllocateStack() -> cpp::span { +auto AllocateStack() -> std::span { constexpr std::size_t size = 4 * 1024; static StackType_t sStack[size]; return {sStack, size}; @@ -63,7 +63,7 @@ auto AllocateStack() -> cpp::span { // cases, where large stack usage isn't so much of a concern. It therefore uses // an eye-wateringly large amount of stack. template <> -auto AllocateStack() -> cpp::span { +auto AllocateStack() -> std::span { std::size_t size = 64 * 1024; return {static_cast(heap_caps_malloc(size, MALLOC_CAP_SPIRAM)), size}; -- cgit v1.2.3