io/FileDescriptor: pass std::span to Full{Read,Write}()

This commit is contained in:
Max Kellermann
2023-09-26 20:40:05 +02:00
committed by Max Kellermann
parent 9a0b3775d8
commit 09a2da89a2
6 changed files with 18 additions and 23 deletions

View File

@@ -87,14 +87,14 @@ try {
break;
auto dest = filter->FilterPCM(std::span{buffer}.first(nbytes));
output_fd.FullWrite(dest.data(), dest.size());
output_fd.FullWrite(dest);
}
while (true) {
auto dest = filter->Flush();
if (dest.data() == nullptr)
break;
output_fd.FullWrite(dest.data(), dest.size());
output_fd.FullWrite(dest);
}
/* cleanup and exit */