From dfa8e649eec644346500bcd7860e982113fa4513 Mon Sep 17 00:00:00 2001 From: stefiosif Date: Sat, 11 Jun 2022 19:17:37 +0300 Subject: [PATCH] Create variable instead of reference when accessing the stack --- algorithm/tarjan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/algorithm/tarjan.h b/algorithm/tarjan.h index b6223d7..fcd0ab2 100644 --- a/algorithm/tarjan.h +++ b/algorithm/tarjan.h @@ -56,7 +56,7 @@ void Tarjan::strongConnect(const T& v) { std::vector SCC; bool finished = false; do { - const auto& w = S.top(); + const auto w = S.top(); S.pop(); vp[w].onStack = false; SCC.push_back(w);