mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 11:16:29 +03:00
use NGHolder::foo in favour of NFAGraph::foo
This commit is contained in:
@@ -476,7 +476,7 @@ NFAVertex extractLiteral(const NGHolder &h, ue2_literal *lit) {
|
||||
}
|
||||
|
||||
if (lit_verts.empty()) {
|
||||
return NFAGraph::null_vertex();
|
||||
return NGHolder::null_vertex();
|
||||
}
|
||||
|
||||
bool nocase = false;
|
||||
@@ -488,7 +488,7 @@ NFAVertex extractLiteral(const NGHolder &h, ue2_literal *lit) {
|
||||
if (cr.isAlpha()) {
|
||||
bool cr_nocase = cr.count() != 1;
|
||||
if (case_set && cr_nocase != nocase) {
|
||||
return NFAGraph::null_vertex();
|
||||
return NGHolder::null_vertex();
|
||||
}
|
||||
|
||||
case_set = true;
|
||||
@@ -511,7 +511,7 @@ bool isSimple(const NGHolder &h, u32 *min_bound, u32 *max_bound,
|
||||
DEBUG_PRINTF("looking for simple case\n");
|
||||
NFAVertex lit_head = extractLiteral(h, lit);
|
||||
|
||||
if (lit_head == NFAGraph::null_vertex()) {
|
||||
if (lit_head == NGHolder::null_vertex()) {
|
||||
DEBUG_PRINTF("no literal found\n");
|
||||
return false;
|
||||
}
|
||||
|
@@ -538,11 +538,11 @@ static
|
||||
bool requiresDedupe(const NGHolder &h, const ue2::flat_set<ReportID> &reports,
|
||||
const Grey &grey) {
|
||||
/* TODO: tighten */
|
||||
NFAVertex seen_vert = NFAGraph::null_vertex();
|
||||
NFAVertex seen_vert = NGHolder::null_vertex();
|
||||
|
||||
for (auto v : inv_adjacent_vertices_range(h.accept, h)) {
|
||||
if (has_intersection(h[v].reports, reports)) {
|
||||
if (seen_vert != NFAGraph::null_vertex()) {
|
||||
if (seen_vert != NGHolder::null_vertex()) {
|
||||
return true;
|
||||
}
|
||||
seen_vert = v;
|
||||
@@ -551,7 +551,7 @@ bool requiresDedupe(const NGHolder &h, const ue2::flat_set<ReportID> &reports,
|
||||
|
||||
for (auto v : inv_adjacent_vertices_range(h.acceptEod, h)) {
|
||||
if (has_intersection(h[v].reports, reports)) {
|
||||
if (seen_vert != NFAGraph::null_vertex()) {
|
||||
if (seen_vert != NGHolder::null_vertex()) {
|
||||
return true;
|
||||
}
|
||||
seen_vert = v;
|
||||
|
Reference in New Issue
Block a user