aboutsummaryrefslogtreecommitdiff
path: root/src/nodedef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r--src/nodedef.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index 57d4c008f..8a1f6203b 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -1675,8 +1675,7 @@ bool NodeDefManager::nodeboxConnects(MapNode from, MapNode to,
NodeResolver::NodeResolver()
{
- m_nodenames.reserve(16);
- m_nnlistsizes.reserve(4);
+ reset();
}
@@ -1779,3 +1778,16 @@ bool NodeResolver::getIdsFromNrBacklog(std::vector<content_t> *result_out,
return success;
}
+
+void NodeResolver::reset(bool resolve_done)
+{
+ m_nodenames.clear();
+ m_nodenames_idx = 0;
+ m_nnlistsizes.clear();
+ m_nnlistsizes_idx = 0;
+
+ m_resolve_done = resolve_done;
+
+ m_nodenames.reserve(16);
+ m_nnlistsizes.reserve(4);
+}