tests: fix range-loop-construct warning with clang 10 and later

Change-Id: I69a40705201f07147dccb21b3aea2db4f384b24e
This commit is contained in:
Davide Pesavento committed 2020-11-24 21:38:44 -05:00
1 parent 4a90b9ae52
commit d8d6bbcbe6
1 file changed
+3 -4
+3 -4
View File
@@ -89,7 +89,7 @@ BOOST_AUTO_TEST_CASE(HyperbolicOn_ZeroCostNeighbors)
nlsr.initialize();
for (const auto neighbor : neighbors.getAdjList()) {
for (const auto& neighbor : neighbors.getAdjList()) {
BOOST_CHECK_EQUAL(neighbor.getLinkCost(), 0);
}
}
@@ -111,9 +111,8 @@ BOOST_AUTO_TEST_CASE(HyperbolicOff_LinkStateCost)
nlsr.initialize();
std::list<Adjacent> neighborList = neighbors.getAdjList();
for (std::list<Adjacent>::iterator it = neighborList.begin(); it != neighborList.end(); ++it) {
BOOST_CHECK(it->getLinkCost() != 0);
for (const auto& neighbor : neighbors.getAdjList()) {
BOOST_CHECK_NE(neighbor.getLinkCost(), 0);
}
}