mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
allow edge_descriptors to be created from pair<edge_descriptor, bool>
This commit is contained in:
@@ -904,7 +904,7 @@ void addToHolder(NGHolder &g, u32 top, const PureRepeat &pr) {
|
||||
u32 min_bound = pr.bounds.min; // always finite
|
||||
if (min_bound == 0) { // Vacuous case, we can only do this once.
|
||||
assert(!edge(g.start, g.accept, g).second);
|
||||
NFAEdge e = add_edge(g.start, g.accept, g).first;
|
||||
NFAEdge e = add_edge(g.start, g.accept, g);
|
||||
g[e].tops.insert(top);
|
||||
g[u].reports.insert(pr.reports.begin(), pr.reports.end());
|
||||
min_bound = 1;
|
||||
@@ -913,7 +913,7 @@ void addToHolder(NGHolder &g, u32 top, const PureRepeat &pr) {
|
||||
for (u32 i = 0; i < min_bound; i++) {
|
||||
NFAVertex v = add_vertex(g);
|
||||
g[v].char_reach = pr.reach;
|
||||
NFAEdge e = add_edge(u, v, g).first;
|
||||
NFAEdge e = add_edge(u, v, g);
|
||||
if (u == g.start) {
|
||||
g[e].tops.insert(top);
|
||||
}
|
||||
@@ -932,7 +932,7 @@ void addToHolder(NGHolder &g, u32 top, const PureRepeat &pr) {
|
||||
if (head != u) {
|
||||
add_edge(head, v, g);
|
||||
}
|
||||
NFAEdge e = add_edge(u, v, g).first;
|
||||
NFAEdge e = add_edge(u, v, g);
|
||||
if (u == g.start) {
|
||||
g[e].tops.insert(top);
|
||||
}
|
||||
|
@@ -544,7 +544,7 @@ void filterAccelStates(NGHolder &g, const map<u32, set<NFAVertex>> &tops,
|
||||
|
||||
// Similarly, connect (start, startDs) if necessary.
|
||||
if (!edge(g.start, g.startDs, g).second) {
|
||||
auto e = add_edge(g.start, g.startDs, g).first;
|
||||
NFAEdge e = add_edge(g.start, g.startDs, g);
|
||||
tempEdges.push_back(e); // Remove edge later.
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user