util/DynamicFifoBuffer: pass std::span to Append()

This commit is contained in:
Max Kellermann
2022-07-11 22:28:31 +02:00
parent 53acf7ae82
commit cd241a93c1
4 changed files with 7 additions and 7 deletions

View File

@@ -109,9 +109,9 @@ public:
/**
* Append data to the buffer, growing it as needed.
*/
void Append(const_pointer p, size_type n) noexcept {
std::copy_n(p, n, Write(n));
Append(n);
void Append(std::span<const std::byte> src) noexcept {
std::copy(src.begin(), src.end(), Write(src.size()));
Append(src.size());
}
protected: