tag/Id3Load, ...: use std::make_unique_for_overwrite()

Don't zero-initialize the buffers.  This removes some useless
overhead.
This commit is contained in:
Max Kellermann
2025-01-29 11:52:35 +01:00
parent a5da7fd51a
commit 57e7fb3f62
10 changed files with 13 additions and 13 deletions

View File

@@ -191,7 +191,7 @@ read_stream_art(Response &r, const std::string_view art_directory,
std::min<offset_type>(art_file_size - offset,
r.GetClient().binary_limit);
auto buffer = std::make_unique<std::byte[]>(buffer_size);
auto buffer = std::make_unique_for_overwrite<std::byte[]>(buffer_size);
std::size_t read_size = 0;
if (buffer_size > 0) {