From 4bfd256b105d8f5300d266b4df38e722b9b58d45 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 20 Sep 2024 13:47:30 -0700 Subject: [PATCH] Separate declaring a lambda from calling it --- alc/effects/reverb.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp index 7a5fc9b4..6f46afbd 100644 --- a/alc/effects/reverb.cpp +++ b/alc/effects/reverb.cpp @@ -1120,7 +1120,8 @@ void ReverbPipeline::update3DPanning(const al::span ReflectionsPa const auto earlymat = GetTransformFromVector(ReflectionsPan); const auto latemat = GetTransformFromVector(LateReverbPan); - const auto [earlycoeffs, latecoeffs] = [&]{ + const auto get_coeffs = [&] + { if(doUpmix) { /* When upsampling, combine the early and late transforms with the @@ -1176,7 +1177,8 @@ void ReverbPipeline::update3DPanning(const al::span ReflectionsPa return res; }; return std::array{mult_matrix(EarlyA2B, earlymat), mult_matrix(LateA2B, latemat)}; - }(); + }; + const auto [earlycoeffs, latecoeffs] = get_coeffs(); auto earlygains = mEarly.Gains.begin(); for(auto &coeffs : earlycoeffs) -- 2.11.4.GIT