1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Allow ObjDefManager instances to be cloned

This commit is contained in:
sfan5 2020-04-09 23:40:12 +02:00 committed by Loïc Blot
parent d1c6cc72cc
commit 2062c80e21
13 changed files with 370 additions and 5 deletions

View file

@ -1572,6 +1572,18 @@ NodeResolver::~NodeResolver()
}
void NodeResolver::cloneTo(NodeResolver *res) const
{
FATAL_ERROR_IF(!m_resolve_done, "NodeResolver can only be cloned"
" after resolving has completed");
/* We don't actually do anything significant. Since the node resolving has
* already completed, the class that called us will already have the
* resolved IDs in its data structures (which it copies on its own) */
res->m_ndef = m_ndef;
res->m_resolve_done = true;
}
void NodeResolver::nodeResolveInternal()
{
m_nodenames_idx = 0;