From 10b776b0c3afeefa19ec47c40196cf205a112c8b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 14 Jul 2023 13:08:19 -0600 Subject: [PATCH] [graph] Micro-optimize --- src/graph/graph.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graph/graph.hh b/src/graph/graph.hh index 2e90bc849..7f38b9ca3 100644 --- a/src/graph/graph.hh +++ b/src/graph/graph.hh @@ -749,10 +749,10 @@ struct graph_t { for (const auto& link : vertices_[node_idx].obj.all_links ()) { - const uint32_t *v; + uint32_t *v; if (subgraph.has (link.objidx, &v)) { - subgraph.set (link.objidx, *v + 1); + (*v)++; continue; } subgraph.set (link.objidx, 1);