diff options
author | Chris Robinson <[email protected]> | 2019-06-09 19:27:15 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-06-09 19:27:15 -0700 |
commit | ec6fdff0c68e883908039e396cd68883ee263684 (patch) | |
tree | ee21b1093b2aa3dc021e78bbf9c7dcc4a040d4eb /OpenAL32 | |
parent | bc8f206ee1361ec4b6e740a458bb7985bb7d1429 (diff) |
Make the voice count unsigned
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alSource.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/alSource.cpp b/OpenAL32/alSource.cpp index 9fba7e4f..3404cbf2 100644 --- a/OpenAL32/alSource.cpp +++ b/OpenAL32/alSource.cpp @@ -58,7 +58,7 @@ using namespace std::placeholders; inline ALvoice *GetSourceVoice(ALsource *source, ALCcontext *context) { ALint idx{source->VoiceIdx}; - if(idx >= 0 && idx < context->VoiceCount.load(std::memory_order_relaxed)) + if(idx >= 0 && static_cast<ALuint>(idx) < context->VoiceCount.load(std::memory_order_relaxed)) { ALuint sid{source->id}; ALvoice &voice = (*context->Voices)[idx]; @@ -2799,7 +2799,7 @@ START_API_FUNC { /* Allocate more voices to get enough. */ const size_t alloc_count{need_voices - rem_voices}; - if(UNLIKELY(context->Voices->size() > std::numeric_limits<size_t>::max()-alloc_count)) + if(UNLIKELY(context->Voices->size() > std::numeric_limits<ALsizei>::max()-alloc_count)) SETERR_RETURN(context.get(), AL_OUT_OF_MEMORY,, "Overflow increasing voice count to %zu + %zu", context->Voices->size(), alloc_count); |