aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-02-06 12:35:51 -0800
committerChris Robinson <[email protected]>2023-02-06 12:35:51 -0800
commit0de7ea42fa197833bff70b4c370ed29f9859889d (patch)
treea7c61b3238d135728abbb7fe0496581a9510efb8
parentff530e982ec7cd8eea7033ef7dd4451e81aa32e5 (diff)
Avoid using auto for lambda parameters
-rw-r--r--alc/alu.cpp2
-rw-r--r--alc/context.cpp2
-rw-r--r--common/alcomplex.cpp2
-rw-r--r--core/mastering.cpp10
-rw-r--r--utils/makemhr/makemhr.cpp2
5 files changed, 9 insertions, 9 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp
index d49b0d66..6e243412 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -1966,7 +1966,7 @@ void ApplyDistanceComp(const al::span<FloatBufferLine> Samples, const size_t Sam
auto delay_start = std::swap_ranges(inout, inout_end, distbuf);
std::rotate(distbuf, delay_start, distbuf + base);
}
- std::transform(inout, inout_end, inout, [gain](auto a){ return a * gain; });
+ std::transform(inout, inout_end, inout, [gain](float s) { return s * gain; });
}
}
diff --git a/alc/context.cpp b/alc/context.cpp
index 32bd36eb..0aacaac5 100644
--- a/alc/context.cpp
+++ b/alc/context.cpp
@@ -230,7 +230,7 @@ bool ALCcontext::deinit()
* given context.
*/
std::copy_if(oldarray->begin(), oldarray->end(), newarray->begin(),
- [this](auto a){ return a != this; });
+ [this](ContextBase *ctx) { return ctx != this; });
/* Store the new context array in the device. Wait for any current mix
* to finish before deleting the old array.
diff --git a/common/alcomplex.cpp b/common/alcomplex.cpp
index b6cac4cd..a9e28441 100644
--- a/common/alcomplex.cpp
+++ b/common/alcomplex.cpp
@@ -158,7 +158,7 @@ void complex_hilbert(const al::span<std::complex<double>> buffer)
*bufiter *= inverse_size; ++bufiter;
bufiter = std::transform(bufiter, halfiter, bufiter,
- [scale=inverse_size*2.0](auto a){ return a * scale; });
+ [scale=inverse_size*2.0](std::complex<double> d){ return d * scale; });
*bufiter *= inverse_size; ++bufiter;
std::fill(bufiter, buffer.end(), std::complex<double>{});
diff --git a/core/mastering.cpp b/core/mastering.cpp
index 88a0b5e0..cff162da 100644
--- a/core/mastering.cpp
+++ b/core/mastering.cpp
@@ -87,10 +87,10 @@ void ShiftSlidingHold(SlidingHold *Hold, const uint n)
if(exp_last-exp_begin < 0)
{
std::transform(exp_begin, std::end(Hold->mExpiries), exp_begin,
- [n](auto a){ return a - n; });
+ [n](uint e){ return e - n; });
exp_begin = std::begin(Hold->mExpiries);
}
- std::transform(exp_begin, exp_last+1, exp_begin, [n](auto a){ return a - n; });
+ std::transform(exp_begin, exp_last+1, exp_begin, [n](uint e){ return e - n; });
}
@@ -155,7 +155,7 @@ void PeakDetector(Compressor *Comp, const uint SamplesToDo)
/* Clamp the minimum amplitude to near-zero and convert to logarithm. */
auto side_begin = std::begin(Comp->mSideChain) + Comp->mLookAhead;
std::transform(side_begin, side_begin+SamplesToDo, side_begin,
- [](auto s) { return std::log(maxf(0.000001f, s)); });
+ [](float s) { return std::log(maxf(0.000001f, s)); });
}
/* An optional hold can be used to extend the peak detector so it can more
@@ -404,7 +404,7 @@ void Compressor::process(const uint SamplesToDo, FloatBufferLine *OutBuffer)
{
float *buffer{al::assume_aligned<16>(input.data())};
std::transform(buffer, buffer+SamplesToDo, buffer,
- [preGain](auto a){ return a * preGain; });
+ [preGain](float s) { return s * preGain; });
};
std::for_each(OutBuffer, OutBuffer+numChans, apply_gain);
}
@@ -430,7 +430,7 @@ void Compressor::process(const uint SamplesToDo, FloatBufferLine *OutBuffer)
float *buffer{al::assume_aligned<16>(input.data())};
const float *gains{al::assume_aligned<16>(&sideChain[0])};
std::transform(gains, gains+SamplesToDo, buffer, buffer,
- [](auto a, auto b){ return a * b; });
+ [](float g, float s) { return g * s; });
};
std::for_each(OutBuffer, OutBuffer+numChans, apply_comp);
diff --git a/utils/makemhr/makemhr.cpp b/utils/makemhr/makemhr.cpp
index 6cf3076d..ae301dc3 100644
--- a/utils/makemhr/makemhr.cpp
+++ b/utils/makemhr/makemhr.cpp
@@ -1019,7 +1019,7 @@ static void NormalizeHrirs(HrirDataT *hData)
/* Now scale all IRs by the given factor. */
auto proc_channel = [irSize,factor](double *ir)
- { std::transform(ir, ir+irSize, ir, [factor](auto s){ return s * factor; }); };
+ { std::transform(ir, ir+irSize, ir, [factor](double s){ return s * factor; }); };
auto proc_azi = [channels,proc_channel](HrirAzT &azi)
{ std::for_each(azi.mIrs, azi.mIrs+channels, proc_channel); };
auto proc_elev = [proc_azi](HrirEvT &elev)