From 8e52497d9640a9b49ccc52f25db48fa2eb6f2826 Mon Sep 17 00:00:00 2001 From: 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