From df306b55245de7a281d695046e74717e4cdd511f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 13 Sep 2019 04:15:05 -0700 Subject: Make NumAuxSends unsigned --- alc/alu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'alc/alu.cpp') diff --git a/alc/alu.cpp b/alc/alu.cpp index d9464125..0def577e 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -451,7 +451,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat xpos, const ALfloat ypo }; const auto Frequency = static_cast(Device->Frequency); - const auto NumSends = static_cast(Device->NumAuxSends); + const ALuint NumSends{Device->NumAuxSends}; bool DirectChannels{props->DirectChannels != AL_FALSE}; const ChanMap *chans{nullptr}; @@ -923,7 +923,7 @@ void CalcNonAttnSourceParams(ALvoice *voice, const ALvoicePropsBase *props, cons ALeffectslot *SendSlots[MAX_SENDS]; voice->mDirect.Buffer = Device->Dry.Buffer; - for(ALuint i{0};i < static_cast(Device->NumAuxSends);i++) + for(ALuint i{0};i < Device->NumAuxSends;i++) { SendSlots[i] = props->Send[i].Slot; if(!SendSlots[i] && i == 0) @@ -958,7 +958,7 @@ void CalcNonAttnSourceParams(ALvoice *voice, const ALvoicePropsBase *props, cons ALfloat DryGainHF{props->Direct.GainHF}; ALfloat DryGainLF{props->Direct.GainLF}; ALfloat WetGain[MAX_SENDS], WetGainHF[MAX_SENDS], WetGainLF[MAX_SENDS]; - for(ALsizei i{0};i < Device->NumAuxSends;i++) + for(ALuint i{0};i < Device->NumAuxSends;i++) { WetGain[i] = clampf(props->Gain, props->MinGain, props->MaxGain); WetGain[i] *= props->Send[i].Gain * Listener.Params.Gain; @@ -974,7 +974,7 @@ void CalcNonAttnSourceParams(ALvoice *voice, const ALvoicePropsBase *props, cons void CalcAttnSourceParams(ALvoice *voice, const ALvoicePropsBase *props, const ALCcontext *ALContext) { const ALCdevice *Device{ALContext->mDevice.get()}; - const auto NumSends = static_cast(Device->NumAuxSends); + const ALuint NumSends{Device->NumAuxSends}; const ALlistener &Listener = ALContext->mListener; /* Set mixing buffers and get send parameters. */ -- cgit v1.2.3