Fix build with clang-5.0
refs: #4547 Change-Id: I7fd0411b3dc7c62651875aa035bbfb6ca269bf81
This commit is contained in:
1 parent
aa41b04807
commit
e6ba9158e0
4 files changed
+11
-12
No files matched your search
+2
-2
@@ -165,13 +165,13 @@ Nlsr::canonizeNeighborUris(std::list<Adjacent>::iterator currentNeighbor,
|
||||
{
|
||||
if (currentNeighbor != m_adjacencyList.getAdjList().end()) {
|
||||
ndn::FaceUri uri(currentNeighbor->getFaceUri());
|
||||
uri.canonize([this, then, currentNeighbor] (ndn::FaceUri canonicalUri) {
|
||||
uri.canonize([then, currentNeighbor] (ndn::FaceUri canonicalUri) {
|
||||
NLSR_LOG_DEBUG("Canonized URI: " << currentNeighbor->getFaceUri()
|
||||
<< " to: " << canonicalUri);
|
||||
currentNeighbor->setFaceUri(canonicalUri);
|
||||
then(std::next(currentNeighbor));
|
||||
},
|
||||
[this, then, currentNeighbor] (const std::string& reason) {
|
||||
[then, currentNeighbor] (const std::string& reason) {
|
||||
NLSR_LOG_ERROR("Could not canonize URI: " << currentNeighbor->getFaceUri()
|
||||
<< " because: " << reason);
|
||||
then(std::next(currentNeighbor));
|
||||
|
||||
+2
-2
@@ -308,8 +308,8 @@ BOOST_FIXTURE_TEST_CASE(ScheduleFibEntryRefresh, FibFixture)
|
||||
int origSeqNo = fe.getSeqNo();
|
||||
|
||||
fib->scheduleEntryRefresh(fe,
|
||||
[&, this] (FibEntry& entry) {
|
||||
BOOST_CHECK_EQUAL(origSeqNo+1, entry.getSeqNo());
|
||||
[&] (FibEntry& entry) {
|
||||
BOOST_CHECK_EQUAL(origSeqNo + 1, entry.getSeqNo());
|
||||
});
|
||||
this->advanceClocks(ndn::time::milliseconds(10), 1);
|
||||
}
|
||||
|
||||
+1
-2
@@ -452,8 +452,7 @@ BOOST_AUTO_TEST_CASE(CanonizeUris)
|
||||
nlsr.canonizeNeighborUris(iterator, thenCallback, finallyCallback);
|
||||
};
|
||||
nlsr.canonizeNeighborUris(nlsr.getAdjacencyList().getAdjList().begin(),
|
||||
[&thenCallback, &finallyCallback]
|
||||
(std::list<Adjacent>::iterator iterator) {
|
||||
[&] (std::list<Adjacent>::iterator iterator) {
|
||||
thenCallback(iterator);
|
||||
},
|
||||
finallyCallback);
|
||||
|
||||
@@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE(UpdateForOtherLS)
|
||||
|
||||
// Actual testing done here -- signal function callback
|
||||
ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
|
||||
[&, this] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
[&] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
BOOST_CHECK_EQUAL(ndn::Name{updateName}, routerName);
|
||||
BOOST_CHECK_EQUAL(sequenceNumber, syncSeqNo);
|
||||
});
|
||||
@@ -139,7 +139,7 @@ BOOST_AUTO_TEST_CASE(UpdateForOtherHR)
|
||||
+ OTHER_ROUTER_NAME + std::to_string(lsaType);
|
||||
|
||||
ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
|
||||
[& ,this] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
[&] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
BOOST_CHECK_EQUAL(ndn::Name{updateName}, routerName);
|
||||
BOOST_CHECK_EQUAL(sequenceNumber, syncSeqNo);
|
||||
});
|
||||
@@ -166,7 +166,7 @@ BOOST_AUTO_TEST_CASE(UpdateForOtherHRDry)
|
||||
+ OTHER_ROUTER_NAME + std::to_string(lsaType);
|
||||
|
||||
ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
|
||||
[& ,this] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
[&] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
BOOST_CHECK_EQUAL(ndn::Name{updateName}, routerName);
|
||||
BOOST_CHECK_EQUAL(sequenceNumber, syncSeqNo);
|
||||
});
|
||||
@@ -193,7 +193,7 @@ BOOST_AUTO_TEST_CASE(NoUpdateForSelf)
|
||||
updateName.append(CONFIG_SITE).append(CONFIG_ROUTER_NAME).append(std::to_string(lsaType));
|
||||
|
||||
ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
|
||||
[& ,this] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
[&] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
BOOST_FAIL("Updates for self should not be emitted!");
|
||||
});
|
||||
|
||||
@@ -217,7 +217,7 @@ BOOST_AUTO_TEST_CASE(MalformedUpdate)
|
||||
updateName.append(CONFIG_ROUTER_NAME).append(std::to_string(lsaType));
|
||||
|
||||
ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
|
||||
[& ,this] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
[&] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
BOOST_FAIL("Malformed updates should not be emitted!");
|
||||
});
|
||||
|
||||
@@ -240,7 +240,7 @@ BOOST_AUTO_TEST_CASE(LsaNotNew)
|
||||
SyncLogicHandler sync{face, testLsaAlwaysFalse, conf};
|
||||
sync.createSyncSocket(conf.getChronosyncPrefix());
|
||||
ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
|
||||
[& ,this] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
[&] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
|
||||
BOOST_FAIL("An update for an LSA with non-new sequence number should not emit!");
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user