io/FileDescriptor: add Read()/Write() overloads with std::span

This commit is contained in:
Max Kellermann
2023-09-27 10:46:43 +02:00
committed by Max Kellermann
parent 5fbe5951ab
commit cad35a83fb
7 changed files with 14 additions and 7 deletions

View File

@@ -99,7 +99,7 @@ RunConvert(PcmConvert &convert, size_t in_frame_size,
const auto dest = buffer.Write();
assert(!dest.empty());
ssize_t nbytes = in_fd.Read(dest.data(), dest.size());
ssize_t nbytes = in_fd.Read(dest);
if (nbytes <= 0)
break;