Switched Node::operator=(const Node&) to *not* force itself to create its node first (since we're just assigning them)
This commit is contained in:
parent
0c321a6dc6
commit
a8f82af604
@ -138,9 +138,14 @@ namespace YAML
|
||||
|
||||
inline void Node::AssignNode(const Node& rhs)
|
||||
{
|
||||
EnsureNodeExists();
|
||||
rhs.EnsureNodeExists();
|
||||
|
||||
if(!m_pNode) {
|
||||
m_pNode = rhs.m_pNode;
|
||||
m_pMemory = rhs.m_pMemory;
|
||||
return;
|
||||
}
|
||||
|
||||
m_pNode->set_ref(*rhs.m_pNode);
|
||||
m_pMemory->merge(*rhs.m_pMemory);
|
||||
m_pNode = rhs.m_pNode;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user