Fix -Wshadow in remove_children()

child variable was shadowing xml_node::child
This commit is contained in:
Arseny Kapoulkine 2020-11-25 09:28:26 -08:00
parent 28aebf2b22
commit 5f97d5d66f

View File

@ -6142,13 +6142,13 @@ namespace pugi
impl::xml_allocator& alloc = impl::get_allocator(_root); impl::xml_allocator& alloc = impl::get_allocator(_root);
if (!alloc.reserve()) return false; 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; _root->first_child = 0;