]> granicus.if.org Git - graphviz/commitdiff
use a range-based for-loop to simplify remapInConstraints
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 26 Jun 2021 18:47:49 +0000 (11:47 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 30 Jun 2021 04:28:45 +0000 (21:28 -0700)
lib/vpsc/csolve_VPSC.cpp

index f1305bad2895669eefd0e3af1229194fd052f7ad..82899c855cb25acb52faae728e00d40b7fbd9544 100644 (file)
@@ -89,8 +89,7 @@ double getVariablePos(Variable *v) {
        return v->position();
 }
 void remapInConstraints(Variable *u, Variable *v, double dgap) {
-       for(Constraints::iterator i=u->in.begin();i!=u->in.end();i++) {
-               Constraint* c=*i;       
+       for (Constraint *c : u->in) {
                c->right=v;
                c->gap+=dgap;
                v->in.push_back(c);