From 11607eb5bf1258641d80f7051e7cf09e317b4746 Mon Sep 17 00:00:00 2001 From: Dan Ibanez Date: Mon, 3 Apr 2017 12:32:35 -0600 Subject: [PATCH] fix some warnings in public headers (#486) * fix two compile warnings in public headers both warnings have to do with variable name shadowing --- include/yaml-cpp/node/detail/impl.h | 4 ++-- include/yaml-cpp/node/detail/node.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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);