diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-05-10 13:06:20 +1000 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2024-05-10 13:06:20 +1000 |
| commit | 3f177cdb8880abf199f4445f1398cd69fb813892 (patch) | |
| tree | e20de4949b1344c826e5af41ab701f3db75b21bc /src/codecs/source_buffer.cpp | |
| parent | 8019c7691889cde4c3d40bbd78d485a92d713bbf (diff) | |
| parent | e4ce7c4ac23402e09be8d6a52e0f739c0dff4ff0 (diff) | |
| download | tangara-fw-3f177cdb8880abf199f4445f1398cd69fb813892.tar.gz | |
Merge branch 'main' into file-browser
Diffstat (limited to 'src/codecs/source_buffer.cpp')
| -rw-r--r-- | src/codecs/source_buffer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/codecs/source_buffer.cpp b/src/codecs/source_buffer.cpp index 0a986bc3..9cd648cd 100644 --- a/src/codecs/source_buffer.cpp +++ b/src/codecs/source_buffer.cpp @@ -39,7 +39,7 @@ auto SourceBuffer::Refill(IStream* src) -> bool { return false; } bool eof = false; - AddBytes([&](cpp::span<std::byte> buf) -> size_t { + AddBytes([&](std::span<std::byte> buf) -> size_t { ssize_t bytes_read = src->Read(buf); // Treat read errors as EOF. eof = bytes_read <= 0; @@ -48,7 +48,7 @@ auto SourceBuffer::Refill(IStream* src) -> bool { return eof; } -auto SourceBuffer::AddBytes(std::function<size_t(cpp::span<std::byte>)> writer) +auto SourceBuffer::AddBytes(std::function<size_t(std::span<std::byte>)> writer) -> void { if (offset_of_bytes_ > 0) { std::memmove(buffer_.data(), buffer_.data() + offset_of_bytes_, @@ -61,9 +61,9 @@ auto SourceBuffer::AddBytes(std::function<size_t(cpp::span<std::byte>)> writer) } auto SourceBuffer::ConsumeBytes( - std::function<size_t(cpp::span<std::byte>)> reader) -> void { - size_t bytes_consumed = std::invoke( - reader, buffer_.subspan(offset_of_bytes_, bytes_in_buffer_)); + std::function<size_t(std::span<std::byte>)> reader) -> void { + size_t bytes_consumed = + std::invoke(reader, buffer_.subspan(offset_of_bytes_, bytes_in_buffer_)); assert(bytes_consumed <= bytes_in_buffer_); bytes_in_buffer_ -= bytes_consumed; |
