From 9b985c5ce2133dea41b31986d241f0cfc9b5dbc8 Mon Sep 17 00:00:00 2001 From: Jesse Beder Date: Fri, 9 Sep 2011 14:02:18 -0500 Subject: [PATCH] Switched value = otherValue to assign the actual nodes after setting the reference (so that tmp = foo['bar']; tmp = other; is the same as foo['bar'] = other;) --- include/yaml-cpp/value/impl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/yaml-cpp/value/impl.h b/include/yaml-cpp/value/impl.h index 9e0086e..071b76d 100644 --- a/include/yaml-cpp/value/impl.h +++ b/include/yaml-cpp/value/impl.h @@ -122,6 +122,7 @@ namespace YAML { m_pNode->set_ref(*rhs.m_pNode); m_pMemory->merge(*rhs.m_pMemory); + m_pNode = rhs.m_pNode; } // size/iterator