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

@@ -183,11 +183,9 @@ decoder_run_stream_locked(DecoderBridge &bridge, InputStream &is,
UriSuffixBuffer suffix_buffer;
const char *const suffix = uri_get_suffix(uri, suffix_buffer);
using namespace std::placeholders;
const auto f = std::bind(decoder_run_stream_plugin,
std::ref(bridge), std::ref(is), std::ref(lock),
suffix,
_1, std::ref(tried_r));
const auto f = [&,suffix](const auto &plugin)
{ return decoder_run_stream_plugin(bridge, is, lock, suffix, plugin, tried_r); };
return decoder_plugins_try(f);
}