]> granicus.if.org Git - graphviz/commitdiff
use a range-based for loop for iterating over VPSC::inactive
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 8 May 2021 03:13:41 +0000 (20:13 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 14 May 2021 15:26:49 +0000 (08:26 -0700)
lib/vpsc/solve_VPSC.cpp

index e74a2af9a794b48dc2d422c935d94841b0f79416..cc43ef172cdf83c1972912694cc00d8b38562a70 100644 (file)
@@ -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[])