Remove the method SemistaticGraph::changeNodeToTerminal(), it was never used.
diff --git a/include/fruit/impl/data_structures/semistatic_graph.defn.h b/include/fruit/impl/data_structures/semistatic_graph.defn.h
index eb1c7f7..06f11fb 100644
--- a/include/fruit/impl/data_structures/semistatic_graph.defn.h
+++ b/include/fruit/impl/data_structures/semistatic_graph.defn.h
@@ -190,15 +190,6 @@
return p;
}
-template <typename NodeId, typename Node>
-void SemistaticGraph<NodeId, Node>::changeNodeToTerminal(NodeId nodeId) {
- FruitAssert(node_index_map.find(nodeId) != nullptr);
- InternalNodeId internal_node_id = node_index_map.at(nodeId);
- NodeData& node_data = *nodeAtId(internal_node_id);
- FruitAssert(node_data.edges_begin != 1);
- node_data.edges_begin = 0;
-}
-
} // namespace impl
} // namespace fruit
diff --git a/include/fruit/impl/data_structures/semistatic_graph.h b/include/fruit/impl/data_structures/semistatic_graph.h
index 16df1ae..3d2466e 100644
--- a/include/fruit/impl/data_structures/semistatic_graph.h
+++ b/include/fruit/impl/data_structures/semistatic_graph.h
@@ -203,9 +203,6 @@
node_iterator find(NodeId nodeId);
const_node_iterator find(NodeId nodeId) const;
- // Changes the node with ID nodeId (that must exist) to a terminal node.
- void changeNodeToTerminal(NodeId nodeId);
-
#ifdef FRUIT_EXTRA_DEBUG
// Emits a runtime error if some node was not created but there is an edge pointing to it.
void checkFullyConstructed();
diff --git a/tests/data_structures/semistatic_graph.cpp b/tests/data_structures/semistatic_graph.cpp
index c91890f..9635604 100644
--- a/tests/data_structures/semistatic_graph.cpp
+++ b/tests/data_structures/semistatic_graph.cpp
@@ -203,7 +203,7 @@
vector<size_t> neighbors = {2, 4};
vector<SimpleNode> values{{2, "foo", &no_neighbors, false}, {3, "bar", &neighbors, false}, {4, "baz", &no_neighbors, true}};
Graph graph(values.begin(), values.end(), -1, -2);
- graph.changeNodeToTerminal(3);
+ graph.find(3).setTerminal();
Assert(graph.find(0) == graph.end());
Assert(!(graph.find(2) == graph.end()));
Assert(graph.at(2).getNode() == string("foo"));