aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alu.cpp
diff options
context:
space:
mode:
authorRosen Penev <[email protected]>2023-01-15 13:43:27 -0800
committerGitHub <[email protected]>2023-01-15 13:43:27 -0800
commit0526ecd2f95877b167293e50ab8ce0ce614d03f4 (patch)
treead80a5811292e87601020f6aadcb2f6ff138761d /alc/alu.cpp
parentd9d445772c50e53c12ab77d97cc5f3a76839d83a (diff)
clang-tidy cleanups (#800)
* clang-tidy: use bool literals Found with modernize-use-bool-literals Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: replace std::bind with lambdas Found with modernize-avoid-bind Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: use data() instead of pointer stuff Found with readability-container-data-pointe Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: use empty() Found with readability-container-size-empty Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: remove static in anon namespace Found with readability-static-definition-in-anonymous-namespace Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: remove const return Found with readability-const-return-type Signed-off-by: Rosen Penev <[email protected]> Signed-off-by: Rosen Penev <[email protected]>
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r--alc/alu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp
index cb732738..a171067a 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -866,7 +866,7 @@ void CalcPanningAndFilters(Voice *voice, const float xpos, const float ypos, con
* scaling.
*/
std::transform(coeffs.begin(), coeffs.end(), coeffs.begin(),
- std::bind(std::multiplies<float>{}, _1, (1.0f-coverage)*scales[0]));
+ [coverage, &scales](auto a){ return a * ((1.0f-coverage)*scales[0]); });
if(!(coverage > 0.0f))
{
@@ -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, std::bind(std::multiplies<float>{}, _1, gain));
+ std::transform(inout, inout_end, inout, [gain](auto a){ return a * gain; });
}
}