mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-10 08:12:21 +03:00
allow edge_descriptors to be created from pair<edge_descriptor, bool>
This commit is contained in:
@@ -136,10 +136,7 @@ RoseVertex createVertex(RoseBuildImpl *build, const RoseVertex parent,
|
||||
/* fill in report information */
|
||||
g[v].reports.insert(reports.begin(), reports.end());
|
||||
|
||||
RoseEdge e;
|
||||
bool added;
|
||||
tie(e, added) = add_edge(parent, v, g);
|
||||
assert(added);
|
||||
RoseEdge e = add_edge(parent, v, g);
|
||||
DEBUG_PRINTF("adding edge (%u, %u) to parent\n", minBound, maxBound);
|
||||
|
||||
g[e].minBound = minBound;
|
||||
@@ -169,7 +166,7 @@ RoseVertex createAnchoredVertex(RoseBuildImpl *build, u32 literalId,
|
||||
DEBUG_PRINTF("created anchored vertex %zu with lit id %u\n", g[v].index,
|
||||
literalId);
|
||||
|
||||
RoseEdge e = add_edge(build->anchored_root, v, g).first;
|
||||
RoseEdge e = add_edge(build->anchored_root, v, g);
|
||||
g[e].minBound = min_offset;
|
||||
g[e].maxBound = max_offset;
|
||||
|
||||
@@ -315,10 +312,7 @@ void createVertices(RoseBuildImpl *tbi,
|
||||
|
||||
RoseVertex p = pv.first;
|
||||
|
||||
RoseEdge e;
|
||||
bool added;
|
||||
tie(e, added) = add_edge(p, w, g);
|
||||
assert(added);
|
||||
RoseEdge e = add_edge(p, w, g);
|
||||
DEBUG_PRINTF("adding edge (%u,%u) to parent\n", edge_props.minBound,
|
||||
edge_props.maxBound);
|
||||
g[e].minBound = edge_props.minBound;
|
||||
@@ -356,7 +350,7 @@ void createVertices(RoseBuildImpl *tbi,
|
||||
|
||||
for (const auto &pv : parents) {
|
||||
const RoseInEdgeProps &edge_props = bd.ig[pv.second];
|
||||
RoseEdge e = add_edge(pv.first, g_v, tbi->g).first;
|
||||
RoseEdge e = add_edge(pv.first, g_v, tbi->g);
|
||||
g[e].minBound = edge_props.minBound;
|
||||
g[e].maxBound = edge_props.maxBound;
|
||||
g[e].history = selectHistory(*tbi, bd, pv.second, e);
|
||||
@@ -709,7 +703,7 @@ void makeEodEventLeftfix(RoseBuildImpl &build, RoseVertex u,
|
||||
g[v].left.graph = eod_leftfix;
|
||||
g[v].left.leftfix_report = report_mapping.second;
|
||||
g[v].left.lag = 0;
|
||||
RoseEdge e1 = add_edge(u, v, g).first;
|
||||
RoseEdge e1 = add_edge(u, v, g);
|
||||
g[e1].minBound = 0;
|
||||
g[e1].maxBound = ROSE_BOUND_INF;
|
||||
g[v].min_offset = add_rose_depth(g[u].min_offset,
|
||||
@@ -729,7 +723,7 @@ void makeEodEventLeftfix(RoseBuildImpl &build, RoseVertex u,
|
||||
g[w].reports = report_mapping.first;
|
||||
g[w].min_offset = g[v].min_offset;
|
||||
g[w].max_offset = g[v].max_offset;
|
||||
RoseEdge e = add_edge(v, w, g).first;
|
||||
RoseEdge e = add_edge(v, w, g);
|
||||
g[e].minBound = 0;
|
||||
g[e].maxBound = 0;
|
||||
g[e].history = ROSE_ROLE_HISTORY_LAST_BYTE;
|
||||
@@ -803,7 +797,7 @@ void doRoseAcceptVertex(RoseBuildImpl *tbi,
|
||||
g[w].reports = ig[iv].reports;
|
||||
g[w].min_offset = g[u].min_offset;
|
||||
g[w].max_offset = g[u].max_offset;
|
||||
RoseEdge e = add_edge(u, w, g).first;
|
||||
RoseEdge e = add_edge(u, w, g);
|
||||
g[e].minBound = 0;
|
||||
g[e].maxBound = 0;
|
||||
g[e].history = ROSE_ROLE_HISTORY_LAST_BYTE;
|
||||
|
Reference in New Issue
Block a user