From 77f781958456cfb3356196d34c6fa1690416934a Mon Sep 17 00:00:00 2001 From: Ian Roddis Date: Tue, 31 Aug 2021 19:14:34 -0300 Subject: [PATCH] Fixing test where return by reference would cause unexpected results when compiled with release flags --- tests/unit_dag.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit_dag.cpp b/tests/unit_dag.cpp index 88965fd..16c4727 100644 --- a/tests/unit_dag.cpp +++ b/tests/unit_dag.cpp @@ -69,7 +69,7 @@ TEST_CASE("DAG Traversal Tests", "[dag]") { std::vector 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;