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:
Rosen Penev
2021-11-11 00:47:45 -08:00
parent 061dd2dfef
commit 31aa6d0c4f
8 changed files with 10 additions and 11 deletions

View File

@@ -291,7 +291,7 @@ osx_output_set_channel_map(OSXOutput *oo)
OSStatus status;
const UInt32 num_channels = AudioUnitGetChannelsPerFrame(oo->au);
std::unique_ptr<SInt32[]> channel_map(new SInt32[num_channels]);
auto channel_map = std::make_unique<SInt32[]>(num_channels);
osx_output_parse_channel_map(oo->device_name,
oo->channel_map,
channel_map.get(),