]> granicus.if.org Git - graphviz/commitdiff
use a range-based for loop to abbreviate some code in VPSC::blockGraphIsCyclic
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 8 May 2021 03:43:50 +0000 (20:43 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 14 May 2021 15:26:49 +0000 (08:26 -0700)
lib/vpsc/solve_VPSC.cpp

index 80e73dfd4573f12318b22f45d0525399b35252d7..e9b035cce52e3e988e8e92c6b3b32f49d3f9233d 100644 (file)
@@ -387,8 +387,7 @@ bool VPSC::blockGraphIsCyclic() {
                        return true;
                } else {
                        graph.erase(i);
-                       for(set<node*>::iterator j=u->out.begin();j!=u->out.end();j++) {
-                               node *v=*j;
+                       for(node * v : u->out) {
                                v->in.erase(u);
                        }
                        delete u;