aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-12-17 04:14:39 -0800
committerChris Robinson <[email protected]>2021-12-17 04:14:39 -0800
commit3ed913f6dde4340325079a9c6d14e69c9731e11a (patch)
treebe143b84beab0ec813201d1dad075524acb05b14 /alc
parentc9537abfb1a9d1c94d6bf9aa0e6cfa2cda1ae94b (diff)
Remove an unnecessary parameter
Diffstat (limited to 'alc')
-rw-r--r--alc/context.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/alc/context.cpp b/alc/context.cpp
index 297d24a6..0b6bd022 100644
--- a/alc/context.cpp
+++ b/alc/context.cpp
@@ -171,21 +171,17 @@ ContextBase::~ContextBase()
}
}
-void ContextBase::allocVoiceChanges(size_t addcount)
+void ContextBase::allocVoiceChanges()
{
constexpr size_t clustersize{128};
- /* Convert element count to cluster count. */
- addcount = (addcount+(clustersize-1)) / clustersize;
- while(addcount)
- {
- VoiceChangeCluster cluster{std::make_unique<VoiceChange[]>(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);
- mVoiceChangeClusters.emplace_back(std::move(cluster));
- mVoiceChangeTail = mVoiceChangeClusters.back().get();
- --addcount;
- }
+
+ VoiceChangeCluster cluster{std::make_unique<VoiceChange[]>(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);
+
+ mVoiceChangeClusters.emplace_back(std::move(cluster));
+ mVoiceChangeTail = mVoiceChangeClusters.back().get();
}
void ContextBase::allocVoiceProps()
@@ -287,7 +283,7 @@ void ALCcontext::init()
}
mActiveAuxSlots.store(auxslots, std::memory_order_relaxed);
- allocVoiceChanges(1);
+ allocVoiceChanges();
{
VoiceChange *cur{mVoiceChangeTail};
while(VoiceChange *next{cur->mNext.load(std::memory_order_relaxed)})