diff options
author | Chris Robinson <[email protected]> | 2019-09-01 15:03:22 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-01 15:03:22 -0700 |
commit | d15950f383cfdff64d464721b02b9f9b8cb4a0f2 (patch) | |
tree | ab679d90064ccf5687fda2a9a1b70daee1a1d929 /alc | |
parent | aee10ef60623e012e5edc6fcf31b2d71b2086bc9 (diff) |
Avoid accumulating a temporary
Diffstat (limited to 'alc')
-rw-r--r-- | alc/alu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp index 869346c4..3cf7f4cf 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -1327,8 +1327,8 @@ void ProcessParamUpdates(ALCcontext *ctx, const ALeffectslotArray &slots, { bool force{CalcContextParams(ctx)}; force |= CalcListenerParams(ctx); - force |= std::accumulate(slots.begin(), slots.end(), bool{false}, - [ctx](bool force, ALeffectslot *slot) -> bool + force = std::accumulate(slots.begin(), slots.end(), force, + [ctx](const bool force, ALeffectslot *slot) -> bool { return CalcEffectSlotParams(slot, ctx) | force; } ); |