1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 01:04:50 +01:00

Use std::make_unique instead of new for arrays

This commit is contained in:
Hielke Morsink
2021-08-20 23:42:03 +02:00
parent 6011478590
commit cef26400cf
3 changed files with 3 additions and 3 deletions

View File

@@ -284,7 +284,7 @@ template<> struct DataSerializerTraits_t<OpenRCT2::MemoryStream>
uint32_t length = 0;
s.decode(stream, length);
std::unique_ptr<uint8_t[]> buf(new uint8_t[length]);
auto buf = std::make_unique<uint8_t[]>(length);
stream->Read(buf.get(), length);
val.Write(buf.get(), length);