Create variable instead of reference when accessing the stack
This commit is contained in:
@@ -56,7 +56,7 @@ void Tarjan<T>::strongConnect(const T& v) {
|
||||
std::vector<T> 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);
|
||||
|
||||
Reference in New Issue
Block a user