ng_depth: rename calcDepth functions, return vec

This commit is contained in:
Justin Viiret
2017-05-01 14:57:05 +10:00
committed by Matthew Barr
parent 15c8a7bd98
commit dfe1b8a2af
14 changed files with 65 additions and 76 deletions

View File

@@ -734,8 +734,7 @@ void pruneExtUnreachable(NGHolder &g, const ReportManager &rm) {
const auto &report = rm.getReport(*reports.begin());
vector<NFAVertexBidiDepth> depths;
calcDepths(g, depths);
auto depths = calcBidiDepths(g);
vector<NFAEdge> dead;
@@ -957,8 +956,7 @@ void replaceMinLengthWithOffset(NGHolder &g, ReportManager &rm) {
*/
static
void removeUnneededOffsetBounds(NGHolder &g, ReportManager &rm) {
vector<NFAVertexDepth> depths;
calcDepths(g, depths);
auto depths = calcDepths(g);
replaceReports(g, [&](NFAVertex v, ReportID id) {
const auto &d = depths.at(g[v].index);