aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--al/auxeffectslot.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp
index b765887c..df35c533 100644
--- a/al/auxeffectslot.cpp
+++ b/al/auxeffectslot.cpp
@@ -280,7 +280,8 @@ START_API_FUNC
else
{
al::vector<ALuint> ids;
- ids.reserve(static_cast<ALuint>(n));
+ ALsizei count{n};
+ ids.reserve(static_cast<ALuint>(count));
do {
ALeffectslot *slot{AllocEffectSlot(context.get())};
if(!slot)
@@ -290,7 +291,7 @@ START_API_FUNC
return;
}
ids.emplace_back(slot->id);
- } while(--n);
+ } while(--count);
std::copy(ids.cbegin(), ids.cend(), effectslots);
}