mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-18 02:00:36 +03:00
ng_depth: rename calcDepth functions, return vec
This commit is contained in:
committed by
Matthew Barr
parent
15c8a7bd98
commit
dfe1b8a2af
@@ -118,13 +118,12 @@ struct ReachSubgraph {
|
||||
static
|
||||
void findInitDepths(const NGHolder &g,
|
||||
ue2::unordered_map<NFAVertex, NFAVertexDepth> &depths) {
|
||||
vector<NFAVertexDepth> d;
|
||||
calcDepths(g, d);
|
||||
auto d = calcDepths(g);
|
||||
|
||||
for (auto v : vertices_range(g)) {
|
||||
u32 idx = g[v].index;
|
||||
size_t idx = g[v].index;
|
||||
assert(idx < d.size());
|
||||
depths.insert(make_pair(v, d[idx]));
|
||||
depths.emplace(v, d[idx]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user