use auto with make_unique
C arrays can be used with make_unique in C++17. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -310,7 +310,7 @@ MadDecoder::ParseId3(size_t tagsize, Tag *mpd_tag) noexcept
|
||||
id3_data = stream.this_frame;
|
||||
mad_stream_skip(&(stream), tagsize);
|
||||
} else {
|
||||
allocated.reset(new id3_byte_t[tagsize]);
|
||||
allocated = std::make_unique<id3_byte_t[]>(tagsize);
|
||||
memcpy(allocated.get(), stream.this_frame, count);
|
||||
mad_stream_skip(&(stream), count);
|
||||
|
||||
|
Reference in New Issue
Block a user