Fixing test where return by reference would cause unexpected results when compiled with release flags

This commit is contained in:
Ian Roddis
2021-08-31 19:14:34 -03:00
parent 441cdb5b2e
commit 77f7819584

View File

@@ -69,7 +69,7 @@ TEST_CASE("DAG Traversal Tests", "[dag]") {
std::vector<int> visitOrder(N_VERTICES);
size_t i = 0;
while (!dag.allVisited()) {
const auto &v = dag.visitNext().value();
const auto v = dag.visitNext().value();
dag.completeVisit(v.first);
visitOrder[v.first] = i;
++i;