From 1a821c475a82d710e258662874b580eddda64fce Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 26 Jun 2021 11:47:49 -0700 Subject: [PATCH] use a range-based for-loop to simplify remapInConstraints --- lib/vpsc/csolve_VPSC.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/vpsc/csolve_VPSC.cpp b/lib/vpsc/csolve_VPSC.cpp index f1305bad2..82899c855 100644 --- a/lib/vpsc/csolve_VPSC.cpp +++ b/lib/vpsc/csolve_VPSC.cpp @@ -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); -- 2.50.1