src: Remove unnecessary uses of boost::cref in make_shared and replace boost::cref/boost::ref with just cref/ref
In some cases, due to argument-dependent lookup, it is necessary to use
ndn::ref, instead of just ref.
Change-Id: I682180a007609535855f77511b49622154ad4f11
Refs: #1591
diff --git a/tests/daemon/mgmt/command-validator.cpp b/tests/daemon/mgmt/command-validator.cpp
index 834cc5b..5e1dd30 100644
--- a/tests/daemon/mgmt/command-validator.cpp
+++ b/tests/daemon/mgmt/command-validator.cpp
@@ -230,21 +230,21 @@
config.parse(CONFIG, false, CONFIG_PATH.native());
validator.validate(*fibCommand,
- bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+ bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
BOOST_REQUIRE(m_tester1.commandValidated());
m_tester1.resetValidation();
validator.validate(*statsCommand,
- bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+ bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
BOOST_REQUIRE(m_tester1.commandValidated());
validator.validate(*facesCommand,
- bind(&CommandValidatorTester::onValidated, boost::ref(m_tester2), _1),
- bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester2), _1, _2));
+ bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
+ bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
BOOST_REQUIRE(m_tester2.commandValidated());
m_tester2.resetValidation();
@@ -254,8 +254,8 @@
generator.generateWithIdentity(*unauthorizedFibCommand, m_tester2.getIdentityName());
validator.validate(*unauthorizedFibCommand,
- bind(&CommandValidatorTester::onValidated, boost::ref(m_tester2), _1),
- bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester2), _1, _2));
+ bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
+ bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
BOOST_REQUIRE(m_tester2.commandValidationFailed());
}
@@ -290,21 +290,21 @@
config.parse(CONFIG, true, CONFIG_PATH.native());
validator.validate(*fibCommand,
- bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+ bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
BOOST_REQUIRE(m_tester1.commandValidationFailed());
m_tester1.resetValidation();
validator.validate(*statsCommand,
- bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+ bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
BOOST_REQUIRE(m_tester1.commandValidationFailed());
validator.validate(*facesCommand,
- bind(&CommandValidatorTester::onValidated, boost::ref(m_tester2), _1),
- bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester2), _1, _2));
+ bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
+ bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
BOOST_REQUIRE(m_tester2.commandValidationFailed());
m_tester2.resetValidation();
@@ -314,8 +314,8 @@
generator.generateWithIdentity(*unauthorizedFibCommand, m_tester2.getIdentityName());
validator.validate(*unauthorizedFibCommand,
- bind(&CommandValidatorTester::onValidated, boost::ref(m_tester2), _1),
- bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester2), _1, _2));
+ bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
+ bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
BOOST_REQUIRE(m_tester2.commandValidationFailed());
}
@@ -629,25 +629,22 @@
config.parse(WILDCARD_CERT_CONFIG, false, CONFIG_PATH.native());
validator.validate(*fibCommand,
- bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed,
- boost::ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+ bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
BOOST_REQUIRE(m_tester1.commandValidationFailed());
m_tester1.resetValidation();
validator.validate(*statsCommand,
- bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed,
- boost::ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+ bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
BOOST_REQUIRE(m_tester1.commandValidated());
m_tester1.resetValidation();
validator.validate(*facesCommand,
- bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
- bind(&CommandValidatorTester::onValidationFailed,
- boost::ref(m_tester1), _1, _2));
+ bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+ bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
BOOST_REQUIRE(m_tester1.commandValidated());
m_tester1.resetValidation();