[clang-tidy] replace std::bind with lambdas

Found with modernize-avoid-bind

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-01-31 19:54:34 -08:00
parent bc6eca2115
commit dfed9546aa
4 changed files with 4 additions and 5 deletions

View File

@@ -94,5 +94,5 @@ DsdToDopConverter::Convert(ConstBuffer<uint8_t> src) noexcept
{
using namespace std::placeholders;
return rest_buffer.Process<uint32_t>(buffer, src, 2 * channels,
std::bind(DsdToDop, _1, _2, _3, channels));
[=](auto && arg1, auto && arg2, auto && arg3) { return DsdToDop(arg1, arg2, arg3, channels); });
}

View File

@@ -65,5 +65,5 @@ Dsd16Converter::Convert(ConstBuffer<uint8_t> src) noexcept
{
using namespace std::placeholders;
return rest_buffer.Process<uint16_t>(buffer, src, channels,
std::bind(Dsd8To16, _1, _2, _3, channels));
[=](auto && arg1, auto && arg2, auto && arg3) { return Dsd8To16(arg1, arg2, arg3, channels); });
}

View File

@@ -67,5 +67,5 @@ Dsd32Converter::Convert(ConstBuffer<uint8_t> src) noexcept
{
using namespace std::placeholders;
return rest_buffer.Process<uint32_t>(buffer, src, channels,
std::bind(Dsd8To32, _1, _2, _3, channels));
[=](auto && arg1, auto && arg2, auto && arg3) { return Dsd8To32(arg1, arg2, arg3, channels); });
}