diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2020-11-25 09:28:26 -0800 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2020-11-25 09:28:26 -0800 |
commit | 5f97d5d66f65197417c80de8d10487c6ad96aff1 (patch) | |
tree | e1fef3b5b137811cc6eb79006e9273adf38e2c72 | |
parent | 28aebf2b22f252af8d44955fe45094e5274d71cc (diff) | |
download | pugixml-5f97d5d66f65197417c80de8d10487c6ad96aff1.zip pugixml-5f97d5d66f65197417c80de8d10487c6ad96aff1.tar.gz pugixml-5f97d5d66f65197417c80de8d10487c6ad96aff1.tar.bz2 |
Fix -Wshadow in remove_children()
child variable was shadowing xml_node::child
-rw-r--r-- | src/pugixml.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp index a74b118..e9a6944 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -6142,13 +6142,13 @@ namespace pugi impl::xml_allocator& alloc = impl::get_allocator(_root); if (!alloc.reserve()) return false; - for (xml_node_struct* child = _root->first_child; child; ) + for (xml_node_struct* cur = _root->first_child; cur; ) { - xml_node_struct* next = child->next_sibling; + xml_node_struct* next = cur->next_sibling; - impl::destroy_node(child, alloc); + impl::destroy_node(cur, alloc); - child = next; + cur = next; } _root->first_child = 0; |