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

index 82899c855cb25acb52faae728e00d40b7fbd9544..8002431ff2ea8e7ba80c935f8c6ee11eecf17611 100644 (file)
@@ -97,8 +97,7 @@ void remapInConstraints(Variable *u, Variable *v, double dgap) {
        u->in.clear();
 }
 void remapOutConstraints(Variable *u, Variable *v, double dgap) {
-       for(Constraints::iterator i=u->out.begin();i!=u->out.end();i++) {
-               Constraint* c=*i;       
+       for (Constraint *c : u->out) {
                c->left=v;
                c->gap+=dgap;
                v->out.push_back(c);