From ee99c4151c1af794a412b101a75921c086acaac0 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Thu, 6 Sep 2018 00:16:02 -0400 Subject: [PATCH] Fix a warning from -Wshadow (#627) Variable "it" was shadowed --- include/yaml-cpp/node/detail/impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/yaml-cpp/node/detail/impl.h b/include/yaml-cpp/node/detail/impl.h index 2be4f78..c8853cf 100644 --- a/include/yaml-cpp/node/detail/impl.h +++ b/include/yaml-cpp/node/detail/impl.h @@ -172,9 +172,9 @@ inline bool node_data::remove(const Key& key, shared_memory_holder pMemory) { it = jt; } - for (node_map::iterator it = m_map.begin(); it != m_map.end(); ++it) { - if (it->first->equals(key, pMemory)) { - m_map.erase(it); + for (node_map::iterator iter = m_map.begin(); iter != m_map.end(); ++iter) { + if (iter->first->equals(key, pMemory)) { + m_map.erase(iter); return true; } }