From: Matthew Fernandez Date: Sat, 8 May 2021 03:13:41 +0000 (-0700) Subject: use a range-based for loop for iterating over VPSC::inactive X-Git-Tag: 2.47.2~11^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=853841930778b91fcd79bd9c60974b31843c624f;p=graphviz use a range-based for loop for iterating over VPSC::inactive --- diff --git a/lib/vpsc/solve_VPSC.cpp b/lib/vpsc/solve_VPSC.cpp index e74a2af9a..cc43ef172 100644 --- a/lib/vpsc/solve_VPSC.cpp +++ b/lib/vpsc/solve_VPSC.cpp @@ -38,8 +38,8 @@ using std::set; IncVPSC::IncVPSC(const unsigned n, Variable *vs[], const unsigned m, Constraint *cs[]) : VPSC(n,vs,m,cs) { inactive.assign(cs,cs+m); - for(ConstraintList::iterator i=inactive.begin();i!=inactive.end();i++) { - (*i)->active=false; + for(Constraint *c : inactive) { + c->active=false; } } VPSC::VPSC(const unsigned n, Variable *vs[], const unsigned m, Constraint *cs[])