refactor(flac): use byte_buffer::append()

This commit is contained in:
Marcus Holland-Moritz 2025-04-09 14:38:50 +02:00
parent a9351e6e08
commit cdf2e59fe2

View File

@ -301,8 +301,7 @@ class flac_block_compressor final : public block_compressor::impl {
std::string hdrbuf;
CompactSerializer::serialize(hdr, &hdrbuf);
compressed.resize(pos + hdrbuf.size());
::memcpy(compressed.data() + pos, hdrbuf.data(), hdrbuf.size());
compressed.append(hdrbuf.data(), hdrbuf.size());
}
dwarfs_flac_stream_encoder encoder(compressed);