Reduce usage of std::bind()
C++14 lambdas are easier to read, easier to debug,
and can usually be better optimized by the compiler.
Change-Id: I294f275904f91942a8de946fe63e77078a7608a6
diff --git a/daemon/mgmt/command-authenticator.cpp b/daemon/mgmt/command-authenticator.cpp
index 2196889..7c3cb23 100644
--- a/daemon/mgmt/command-authenticator.cpp
+++ b/daemon/mgmt/command-authenticator.cpp
@@ -107,8 +107,9 @@
void
CommandAuthenticator::setConfigFile(ConfigFile& configFile)
{
- configFile.addSectionHandler("authorizations",
- bind(&CommandAuthenticator::processConfig, this, _1, _2, _3));
+ configFile.addSectionHandler("authorizations", [this] (auto&&... args) {
+ processConfig(std::forward<decltype(args)>(args)...);
+ });
}
void