]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
derefInvalidIteratorRedundantCheck
authorgtsoul-tech <gtsoulkanakis@gmail.com>
Wed, 24 Apr 2024 10:15:17 +0000 (13:15 +0300)
committergtsoul-tech <gtsoulkanakis@gmail.com>
Wed, 24 Apr 2024 10:15:17 +0000 (13:15 +0300)
src/nfagraph/ng_som.cpp

index 359fa17bc33945f1e2484c2f3d93606f22708c7e..0e42b4b5403ae0563d823238eec467e29d2f5a6f 100644 (file)
@@ -1292,8 +1292,8 @@ bool doTreePlanningIntl(NGHolder &g,
         DEBUG_PRINTF("add mapped reporters for region %u\n", it->first);
         addMappedReporterVertices(it->second, g, copy_to_orig,
                                   plan.back().reporters);
-    } while (it->second.optional && it != info.rend() &&
-             (++it)->first > furthest->first);
+    } while (it != info.rend() && it->second.optional && 
+            (++it)->first > furthest->first);
 
     return true;
 }
@@ -1551,7 +1551,7 @@ bool doSomPlanning(NGHolder &g, bool stuck_in,
         DEBUG_PRINTF("region %u contributes reporters to last plan\n",
                      it->first);
         addReporterVertices(it->second, g, plan.back().reporters);
-    } while (it->second.optional && it != info.rend() &&
+    } while (it != info.rend() && it->second.optional &&
              (++it)->first > furthest->first);
 
     DEBUG_PRINTF("done!\n");