mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-18 10:10:35 +03:00
ng: ensure that only match states have reports
Ensure (and assert) that vertices without an edge to {accept, acceptEod}
do not have reports set.
This commit is contained in:
committed by
Matthew Barr
parent
3d9a60d023
commit
4ce268af47
@@ -363,6 +363,12 @@ void splitIntoComponents(const NGHolder &g, deque<unique_ptr<NGHolder>> &comps,
|
||||
*shell_comp = true;
|
||||
}
|
||||
|
||||
// Ensure that only vertices with accept edges have reports.
|
||||
for (auto &gc : comps) {
|
||||
assert(gc);
|
||||
clearReports(*gc);
|
||||
}
|
||||
|
||||
// We should never produce empty component graphs.
|
||||
assert(all_of(begin(comps), end(comps),
|
||||
[](const unique_ptr<NGHolder> &g_comp) {
|
||||
|
||||
Reference in New Issue
Block a user