From: Justin Viiret Date: Thu, 29 Jun 2017 01:38:13 +0000 (+1000) Subject: ng_util: make more use of small_color_map in DFS X-Git-Tag: v4.6.0^2~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c046db360f81606582e9c43920d2e1258fb08a6;p=thirdparty%2Fvectorscan.git ng_util: make more use of small_color_map in DFS --- diff --git a/src/nfagraph/ng_util.cpp b/src/nfagraph/ng_util.cpp index 197ac66d..14082407 100644 --- a/src/nfagraph/ng_util.cpp +++ b/src/nfagraph/ng_util.cpp @@ -214,8 +214,8 @@ bool isFloating(const NGHolder &g) { bool isAcyclic(const NGHolder &g) { try { - boost::depth_first_search(g, visitor(DetectCycles(g)) - .root_vertex(g.start)); + boost::depth_first_search(g, DetectCycles(g), make_small_color_map(g), + g.start); } catch (const CycleFound &) { return false; } @@ -243,7 +243,8 @@ bool hasBigCycles(const NGHolder &g) { assert(hasCorrectlyNumberedVertices(g)); set dead; BackEdges> backEdgeVisitor(dead); - boost::depth_first_search(g, visitor(backEdgeVisitor).root_vertex(g.start)); + boost::depth_first_search(g, backEdgeVisitor, make_small_color_map(g), + g.start); for (const auto &e : dead) { if (source(e, g) != target(e, g)) {