From 2f1566e0b4e71f9b03ae8081e81a85f52ddeab23 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 1 Jan 2019 14:33:01 -0800 Subject: Add and use a make_unique function --- Alc/alc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Alc/alc.cpp') diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 0b89bd71..59582ea6 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -3453,7 +3453,7 @@ ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCin if(DefaultEffect.type != AL_EFFECT_NULL && dev->Type == Playback) { - ALContext->DefaultSlot.reset(new ALeffectslot{}); + ALContext->DefaultSlot = al::make_unique(); if(InitEffectSlot(ALContext->DefaultSlot.get()) == AL_NO_ERROR) aluInitEffectPanning(ALContext->DefaultSlot.get()); else @@ -3652,7 +3652,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) )) deviceName = nullptr; - std::unique_ptr device{new ALCdevice{Playback}}; + auto device = al::make_unique(Playback); //Set output format device->FmtChans = DevFmtChannelsDefault; @@ -3896,7 +3896,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, if(deviceName && (!deviceName[0] || strcasecmp(deviceName, alcDefaultName) == 0 || strcasecmp(deviceName, "openal-soft") == 0)) deviceName = nullptr; - std::unique_ptr device{new ALCdevice{Capture}}; + auto device = al::make_unique(Capture); device->Frequency = frequency; device->Flags |= DEVICE_FREQUENCY_REQUEST; @@ -4060,7 +4060,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN return nullptr; } - std::unique_ptr device{new ALCdevice{Loopback}}; + auto device = al::make_unique(Loopback); device->SourcesMax = 256; device->AuxiliaryEffectSlotMax = 64; -- cgit v1.2.3