mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 17:31:51 +03:00
ddressing some cppcheck warnings. yes this will be cleaned up in a
following commit. tests pass.
This commit is contained in:
@@ -193,9 +193,6 @@ void reduceGraph(NGHolder &g, som_type som, bool utf8,
|
||||
|
||||
if (!som) {
|
||||
mergeCyclicDotStars(g);
|
||||
}
|
||||
|
||||
if (!som) {
|
||||
removeSiblingsOfStartDotStar(g);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -811,11 +811,11 @@ depth_done:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
// Second option: a two-byte shufti (i.e. less than eight 2-byte
|
||||
// literals)
|
||||
if (depth > 1) {
|
||||
// if (depth > 1) {
|
||||
for (unsigned int i = 0; i < (depth - 1); i++) {
|
||||
if (depthReach[i].count() * depthReach[i+1].count()
|
||||
<= DOUBLE_SHUFTI_LIMIT) {
|
||||
|
||||
@@ -267,17 +267,18 @@ bool somMayGoBackwards(NFAVertex u, const NGHolder &g,
|
||||
boost::depth_first_search(c_g, visitor(backEdgeVisitor)
|
||||
.root_vertex(c_g.start));
|
||||
|
||||
for (const auto &e : be) {
|
||||
NFAVertex s = source(e, c_g);
|
||||
NFAVertex t = target(e, c_g);
|
||||
DEBUG_PRINTF("back edge %zu %zu\n", c_g[s].index, c_g[t].index);
|
||||
if (s != t) {
|
||||
assert(0);
|
||||
DEBUG_PRINTF("eek big cycle\n");
|
||||
rv = true; /* big cycle -> eek */
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
// with be.clear right above does this ever run at all?
|
||||
//for (const auto &e : be) {
|
||||
// NFAVertex s = source(e, c_g);
|
||||
// NFAVertex t = target(e, c_g);
|
||||
// DEBUG_PRINTF("back edge %zu %zu\n", c_g[s].index, c_g[t].index);
|
||||
// if (s != t) {
|
||||
// assert(0);
|
||||
// DEBUG_PRINTF("eek big cycle\n");
|
||||
// rv = true; /* big cycle -> eek */
|
||||
// goto exit;
|
||||
// }
|
||||
//}
|
||||
|
||||
DEBUG_PRINTF("checking acyclic+selfloop graph\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user