diff options
author | Chris Robinson <[email protected]> | 2018-12-26 21:55:39 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-26 21:55:39 -0800 |
commit | a4ac43b60294c5e21913c977942b19f174407d85 (patch) | |
tree | dfdf5258689892a4f5ae31c2ca71a845ab0a9787 /Alc | |
parent | 8a0295503db394ea895bfa079d1f3eda0d758e61 (diff) |
Avoid a lambda to find a not-null entry in an array
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alu.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp index 1ebf3adc..e9d251fc 100644 --- a/Alc/alu.cpp +++ b/Alc/alu.cpp @@ -29,6 +29,7 @@ #include <cmath> #include <limits> #include <algorithm> +#include <functional> #include "alMain.h" #include "alcontext.h" @@ -53,6 +54,8 @@ namespace { +using namespace std::placeholders; + ALfloat InitConeScale() { ALfloat ret{1.0f}; @@ -1418,9 +1421,7 @@ void CalcSourceParams(ALvoice *voice, ALCcontext *context, bool force) { auto buffers_end = BufferListItem->buffers+BufferListItem->num_buffers; auto buffer = std::find_if(BufferListItem->buffers, buffers_end, - [](const ALbuffer *buffer) noexcept -> bool - { return buffer != nullptr; } - ); + std::bind(std::not_equal_to<const ALbuffer*>{}, _1, nullptr)); if(LIKELY(buffer != buffers_end)) { if(voice->Props.mSpatializeMode==SpatializeOn || |