diff options
author | Chris Robinson <[email protected]> | 2023-12-21 01:58:55 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-21 12:11:36 -0800 |
commit | eb2c7e84b67e23c2a84cf9b2f8db6da2a1d51a2f (patch) | |
tree | 0ed42b2716380e6be40fa1e5db7ce58a8e3f5e8a /alc/effects/reverb.cpp | |
parent | 32dbdd9d0443e9fdd150a2ccc6c0682f5fd8206e (diff) |
Use a bool for a 0/1 value
Diffstat (limited to 'alc/effects/reverb.cpp')
-rw-r--r-- | alc/effects/reverb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp index cc5768e2..5eefdfbf 100644 --- a/alc/effects/reverb.cpp +++ b/alc/effects/reverb.cpp @@ -551,7 +551,7 @@ struct ReverbState final : public EffectState { Normal, }; PipelineState mPipelineState{DeviceClear}; - uint8_t mCurrentPipeline{0}; + bool mCurrentPipeline{false}; std::array<ReverbPipeline,2> mPipelines; @@ -1235,7 +1235,7 @@ void ReverbState::update(const ContextBase *Context, const EffectSlot *Slot, mParams.LFReference = props->Reverb.LFReference; mPipelineState = (mPipelineState != DeviceClear) ? StartFade : Normal; - mCurrentPipeline ^= 1; + mCurrentPipeline = !mCurrentPipeline; } auto &pipeline = mPipelines[mCurrentPipeline]; @@ -1671,7 +1671,7 @@ void ReverbState::process(const size_t samplesToDo, const al::span<const FloatBu ASSUME(samplesToDo > 0); - auto &oldpipeline = mPipelines[mCurrentPipeline^1]; + auto &oldpipeline = mPipelines[!mCurrentPipeline]; auto &pipeline = mPipelines[mCurrentPipeline]; if(mPipelineState >= Fading) @@ -1781,7 +1781,7 @@ void ReverbState::process(const size_t samplesToDo, const al::span<const FloatBu if(mPipelineState == Cleanup) { size_t numSamples{mSampleBuffer.size()/2}; - size_t pipelineOffset{numSamples * (mCurrentPipeline^1)}; + size_t pipelineOffset{numSamples * (!mCurrentPipeline)}; std::fill_n(mSampleBuffer.data()+pipelineOffset, numSamples, decltype(mSampleBuffer)::value_type{}); |