remove std::bind usage as much as possible

Reduces unstripped size. stripped size is the same.

Also took the time to remove using std::placeholders.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-05-04 14:27:04 -07:00
parent 3c955639a7
commit e6a77e1297
11 changed files with 42 additions and 46 deletions

View File

@@ -91,7 +91,6 @@ DsdToDopConverter::Open(unsigned _channels) noexcept
ConstBuffer<uint32_t>
DsdToDopConverter::Convert(ConstBuffer<uint8_t> src) noexcept
{
using namespace std::placeholders;
return rest_buffer.Process<uint32_t>(buffer, src, 2 * channels,
[=](auto && arg1, auto && arg2, auto && arg3) { return DsdToDop(arg1, arg2, arg3, channels); });
[=](auto && arg1, auto && arg2, auto && arg3) { return DsdToDop(arg1, arg2, arg3, channels); });
}

View File

@@ -63,7 +63,6 @@ Dsd16Converter::Open(unsigned _channels) noexcept
ConstBuffer<uint16_t>
Dsd16Converter::Convert(ConstBuffer<uint8_t> src) noexcept
{
using namespace std::placeholders;
return rest_buffer.Process<uint16_t>(buffer, src, channels,
[=](auto && arg1, auto && arg2, auto && arg3) { return Dsd8To16(arg1, arg2, arg3, channels); });
}

View File

@@ -65,7 +65,6 @@ Dsd32Converter::Open(unsigned _channels) noexcept
ConstBuffer<uint32_t>
Dsd32Converter::Convert(ConstBuffer<uint8_t> src) noexcept
{
using namespace std::placeholders;
return rest_buffer.Process<uint32_t>(buffer, src, channels,
[=](auto && arg1, auto && arg2, auto && arg3) { return Dsd8To32(arg1, arg2, arg3, channels); });
}