]> granicus.if.org Git - graphviz/commitdiff
use a range-based for loop for iterating over block total order collection
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 8 May 2021 03:15:07 +0000 (20:15 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 14 May 2021 15:26:49 +0000 (08:26 -0700)
lib/vpsc/solve_VPSC.cpp

index cc43ef172cdf83c1972912694cc00d8b38562a70..dbe438428ab8f50dd50299ee6e6e68f17a265e3b 100644 (file)
@@ -74,8 +74,7 @@ void VPSC::printBlocks() {
 */
 void VPSC::satisfy() {
        list<Variable*> *vs=bs.totalOrder();
-       for(list<Variable*>::iterator i=vs->begin();i!=vs->end();i++) {
-               Variable *v=*i;
+       for(Variable *v : *vs) {
                if(!v->block->deleted) {
                        bs.mergeLeft(v->block);
                }