aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-09 19:27:15 -0700
committerChris Robinson <[email protected]>2019-06-09 19:27:15 -0700
commitec6fdff0c68e883908039e396cd68883ee263684 (patch)
treeee21b1093b2aa3dc021e78bbf9c7dcc4a040d4eb /Alc
parentbc8f206ee1361ec4b6e740a458bb7985bb7d1429 (diff)
Make the voice count unsigned
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alc.cpp4
-rw-r--r--Alc/alcontext.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index 10c093d5..99966853 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -2606,7 +2606,7 @@ void AllocateVoices(ALCcontext *context, size_t num_voices)
voices.reset(new (ptr) al::FlexArray<ALvoice>{num_voices});
}
- const ALsizei v_count{mini(context->VoiceCount.load(std::memory_order_relaxed), num_voices)};
+ const size_t v_count{minz(context->VoiceCount.load(std::memory_order_relaxed), num_voices)};
if(context->Voices)
{
/* Copy the old voice data to the new storage. */
@@ -2631,7 +2631,7 @@ void AllocateVoices(ALCcontext *context, size_t num_voices)
}
context->Voices = std::move(voices);
- context->VoiceCount.store(v_count, std::memory_order_relaxed);
+ context->VoiceCount.store(static_cast<ALuint>(v_count), std::memory_order_relaxed);
}
diff --git a/Alc/alcontext.h b/Alc/alcontext.h
index 63983ca3..1887e341 100644
--- a/Alc/alcontext.h
+++ b/Alc/alcontext.h
@@ -117,7 +117,7 @@ struct ALCcontext {
std::atomic<ALeffectslotProps*> FreeEffectslotProps{nullptr};
std::unique_ptr<al::FlexArray<ALvoice>> Voices{nullptr};
- std::atomic<ALsizei> VoiceCount{0};
+ std::atomic<ALuint> VoiceCount{0u};
using ALeffectslotArray = al::FlexArray<ALeffectslot*>;
std::atomic<ALeffectslotArray*> ActiveAuxSlots{nullptr};