diff options
author | Chris Robinson <[email protected]> | 2019-09-14 20:19:59 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-14 20:19:59 -0700 |
commit | e4cc77ea237c8a2ca67cb0a1cb28e6d652746590 (patch) | |
tree | 8baaca4469d1b28046df164a78fcc7509a3f12ce | |
parent | 4b8f78a8d633e3f39e2b708184c051465fcfef7d (diff) |
Fix a few warnings from MSVC
-rw-r--r-- | al/source.cpp | 12 | ||||
-rw-r--r-- | alc/effects/compressor.cpp | 2 | ||||
-rw-r--r-- | alc/effects/reverb.cpp | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/al/source.cpp b/al/source.cpp index f8d5fbcd..53d2a705 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -1126,14 +1126,14 @@ bool SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, const a CHECKSIZE(values, 1); CHECKVAL(values[0] == AL_FALSE || values[0] == AL_TRUE); - Source->HeadRelative = static_cast<ALboolean>(values[0]); + Source->HeadRelative = values[0] != AL_FALSE; return UpdateSourceProps(Source, Context); case AL_LOOPING: CHECKSIZE(values, 1); CHECKVAL(values[0] == AL_FALSE || values[0] == AL_TRUE); - Source->Looping = static_cast<ALboolean>(values[0]); + Source->Looping = values[0] != AL_FALSE; if(IsPlayingOrPaused(Source)) { if(ALvoice *voice{GetSourceVoice(Source, Context)}) @@ -1258,28 +1258,28 @@ bool SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, const a CHECKSIZE(values, 1); CHECKVAL(values[0] == AL_FALSE || values[0] == AL_TRUE); - Source->DryGainHFAuto = values[0]; + Source->DryGainHFAuto = values[0] != AL_FALSE; return UpdateSourceProps(Source, Context); case AL_AUXILIARY_SEND_FILTER_GAIN_AUTO: CHECKSIZE(values, 1); CHECKVAL(values[0] == AL_FALSE || values[0] == AL_TRUE); - Source->WetGainAuto = values[0]; + Source->WetGainAuto = values[0] != AL_FALSE; return UpdateSourceProps(Source, Context); case AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO: CHECKSIZE(values, 1); CHECKVAL(values[0] == AL_FALSE || values[0] == AL_TRUE); - Source->WetGainHFAuto = values[0]; + Source->WetGainHFAuto = values[0] != AL_FALSE; return UpdateSourceProps(Source, Context); case AL_DIRECT_CHANNELS_SOFT: CHECKSIZE(values, 1); CHECKVAL(values[0] == AL_FALSE || values[0] == AL_TRUE); - Source->DirectChannels = values[0]; + Source->DirectChannels = values[0] != AL_FALSE; return UpdateSourceProps(Source, Context); case AL_DISTANCE_MODEL: diff --git a/alc/effects/compressor.cpp b/alc/effects/compressor.cpp index 176e5a58..44ffaaef 100644 --- a/alc/effects/compressor.cpp +++ b/alc/effects/compressor.cpp @@ -161,7 +161,7 @@ void Compressor_setParami(EffectProps *props, ALCcontext *context, ALenum param, case AL_COMPRESSOR_ONOFF: if(!(val >= AL_COMPRESSOR_MIN_ONOFF && val <= AL_COMPRESSOR_MAX_ONOFF)) SETERR_RETURN(context, AL_INVALID_VALUE,, "Compressor state out of range"); - props->Compressor.OnOff = val; + props->Compressor.OnOff = val != AL_FALSE; break; default: diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp index b5100a14..82a80198 100644 --- a/alc/effects/reverb.cpp +++ b/alc/effects/reverb.cpp @@ -1526,7 +1526,7 @@ void EAXReverb_setParami(EffectProps *props, ALCcontext *context, ALenum param, case AL_EAXREVERB_DECAY_HFLIMIT: if(!(val >= AL_EAXREVERB_MIN_DECAY_HFLIMIT && val <= AL_EAXREVERB_MAX_DECAY_HFLIMIT)) SETERR_RETURN(context, AL_INVALID_VALUE,, "EAX Reverb decay hflimit out of range"); - props->Reverb.DecayHFLimit = val; + props->Reverb.DecayHFLimit = val != AL_FALSE; break; default: @@ -1863,7 +1863,7 @@ void StdReverb_setParami(EffectProps *props, ALCcontext *context, ALenum param, case AL_REVERB_DECAY_HFLIMIT: if(!(val >= AL_REVERB_MIN_DECAY_HFLIMIT && val <= AL_REVERB_MAX_DECAY_HFLIMIT)) SETERR_RETURN(context, AL_INVALID_VALUE,, "Reverb decay hflimit out of range"); - props->Reverb.DecayHFLimit = val; + props->Reverb.DecayHFLimit = val != AL_FALSE; break; default: |