"docs/vscode:/vscode.git/clone" did not exist on "505c5a47402f78588bba09afd83f47516c042a45"
Commit 78ebd145 authored by beder's avatar beder
Browse files

Switched Node::operator=(const Node&) to *not* force itself to create its node...

Switched Node::operator=(const Node&) to *not* force itself to create its node first (since we're just assigning them)
parent 04152dae
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment