From: Matthew Fernandez Date: Sat, 26 Jun 2021 18:48:39 +0000 (-0700) Subject: use a range-based for-loop to simplify remapOutConstraints X-Git-Tag: 2.48.0~23^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4008b600c1244b5e57a681b02f1c089eb0180c3c;p=graphviz use a range-based for-loop to simplify remapOutConstraints --- diff --git a/lib/vpsc/csolve_VPSC.cpp b/lib/vpsc/csolve_VPSC.cpp index 82899c855..8002431ff 100644 --- a/lib/vpsc/csolve_VPSC.cpp +++ b/lib/vpsc/csolve_VPSC.cpp @@ -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);