input/InputStream: pass std::span<std::byte> to Read()

This commit is contained in:
Max Kellermann
2024-05-13 10:47:57 +02:00
parent f28d10d934
commit 34f7b38f39
66 changed files with 248 additions and 274 deletions

View File

@@ -105,11 +105,11 @@ ProxyInputStream::IsAvailable() const noexcept
size_t
ProxyInputStream::Read(std::unique_lock<Mutex> &lock,
void *ptr, size_t read_size)
std::span<std::byte> dest)
{
set_input_cond.wait(lock, [this]{ return !!input; });
size_t nbytes = input->Read(lock, ptr, read_size);
size_t nbytes = input->Read(lock, dest);
CopyAttributes();
return nbytes;
}