Further reduce the use of std::bind()
And also avoid deprecated ndn-cxx type aliases
Change-Id: I87e903b9671a3cf1c1b9ab30d4594d595c3c6da9
diff --git a/daemon/mgmt/strategy-choice-manager.cpp b/daemon/mgmt/strategy-choice-manager.cpp
index fa18856..af74ee1 100644
--- a/daemon/mgmt/strategy-choice-manager.cpp
+++ b/daemon/mgmt/strategy-choice-manager.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -43,12 +43,11 @@
, m_table(strategyChoice)
{
registerCommandHandler<ndn::nfd::StrategyChoiceSetCommand>("set",
- std::bind(&StrategyChoiceManager::setStrategy, this, _4, _5));
+ [this] (auto&&, auto&&, auto&&, auto&&... args) { setStrategy(std::forward<decltype(args)>(args)...); });
registerCommandHandler<ndn::nfd::StrategyChoiceUnsetCommand>("unset",
- std::bind(&StrategyChoiceManager::unsetStrategy, this, _4, _5));
-
+ [this] (auto&&, auto&&, auto&&, auto&&... args) { unsetStrategy(std::forward<decltype(args)>(args)...); });
registerStatusDatasetHandler("list",
- std::bind(&StrategyChoiceManager::listChoices, this, _3));
+ [this] (auto&&, auto&&, auto&&... args) { listChoices(std::forward<decltype(args)>(args)...); });
}
void