From 813d4ed5668b44532f234a860ef494411a1009b1 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 22 Mar 2020 18:48:33 -0700 Subject: Use make_unique instead of new'ing into a unique_ptr --- alc/alc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alc/alc.cpp') diff --git a/alc/alc.cpp b/alc/alc.cpp index 1608cac6..562005fd 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -1644,7 +1644,7 @@ void ALCcontext::allocVoiceChanges(size_t addcount) addcount = (addcount+(clustersize-1)) / clustersize; while(addcount) { - VoiceChangeCluster cluster{new VoiceChange[clustersize]}; + VoiceChangeCluster cluster{std::make_unique(clustersize)}; for(size_t i{1};i < clustersize;++i) cluster[i-1].mNext.store(std::addressof(cluster[i]), std::memory_order_relaxed); cluster[clustersize-1].mNext.store(mVoiceChangeTail, std::memory_order_relaxed); @@ -1666,7 +1666,7 @@ void ALCcontext::allocVoices(size_t addcount) auto newarray = ALvoiceArray::Create((mVoiceClusters.size()+addcount) * clustersize); while(addcount) { - mVoiceClusters.emplace_back(VoiceCluster{new ALvoice[clustersize]}); + mVoiceClusters.emplace_back(std::make_unique(clustersize)); --addcount; } -- cgit v1.2.3