diff --git a/include/yaml-cpp/node/detail/impl.h b/include/yaml-cpp/node/detail/impl.h index 5931826..09e55f8 100644 --- a/include/yaml-cpp/node/detail/impl.h +++ b/include/yaml-cpp/node/detail/impl.h @@ -132,8 +132,8 @@ inline bool node_data::remove(const Key& key, shared_memory_holder pMemory) { if (m_type != NodeType::Map) return false; - kv_pairs::iterator it = m_undefinedPairs.begin(); - while (it != m_undefinedPairs.end()) { + for (kv_pairs::iterator it = m_undefinedPairs.begin(); + it != m_undefinedPairs.end();) { kv_pairs::iterator jt = std::next(it); if (it->first->equals(key, pMemory)) m_undefinedPairs.erase(it); diff --git a/include/yaml-cpp/node/detail/node.h b/include/yaml-cpp/node/detail/node.h index 3154a52..8a776f6 100644 --- a/include/yaml-cpp/node/detail/node.h +++ b/include/yaml-cpp/node/detail/node.h @@ -106,9 +106,9 @@ class node { node_iterator end() { return m_pRef->end(); } // sequence - void push_back(node& node, shared_memory_holder pMemory) { - m_pRef->push_back(node, pMemory); - node.add_dependency(*this); + void push_back(node& input, shared_memory_holder pMemory) { + m_pRef->push_back(input, pMemory); + input.add_dependency(*this); } void insert(node& key, node& value, shared_memory_holder pMemory) { m_pRef->insert(key, value, pMemory);