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/tests/daemon/mgmt/manager-base.t.cpp b/tests/daemon/mgmt/manager-base.t.cpp
index 858ea40..315bf28 100644
--- a/tests/daemon/mgmt/manager-base.t.cpp
+++ b/tests/daemon/mgmt/manager-base.t.cpp
@@ -88,7 +88,7 @@
BOOST_AUTO_TEST_CASE(RegisterCommandHandler)
{
bool wasCommandHandlerCalled = false;
- auto handler = bind([&] { wasCommandHandlerCalled = true; });
+ auto handler = [&] (auto&&...) { wasCommandHandlerCalled = true; };
m_manager.registerCommandHandler<TestCommandVoidParameters>("test-void", handler);
m_manager.registerCommandHandler<TestCommandRequireName>("test-require-name", handler);
@@ -109,7 +109,7 @@
BOOST_AUTO_TEST_CASE(RegisterStatusDataset)
{
bool isStatusDatasetCalled = false;
- auto handler = bind([&] { isStatusDatasetCalled = true; });
+ auto handler = [&] (auto&&...) { isStatusDatasetCalled = true; };
m_manager.registerStatusDatasetHandler("test-status", handler);
setTopPrefix();