From 6e1c9ec7d1c52afe25a7f51c66cd5d5cad75ddc8 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 15 Sep 2014 02:41:42 +0000 Subject: Fix VC 14 warnings Fixes C4458: declaration of 'var' hides class member git-svn-id: https://pugixml.googlecode.com/svn/trunk@1011 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixml.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/pugixml.cpp b/src/pugixml.cpp index ad2262f..5888159 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -2806,7 +2806,7 @@ PUGI__NS_BEGIN static xml_parse_result parse(char_t* buffer, size_t length, xml_document_struct* xmldoc, xml_node_struct* root, unsigned int optmsk) { // allocator object is a part of document object - xml_allocator& alloc = *static_cast(xmldoc); + xml_allocator& alloc_ = *static_cast(xmldoc); // early-out for empty documents if (length == 0) @@ -2816,7 +2816,7 @@ PUGI__NS_BEGIN xml_node_struct* last_root_child = root->first_child ? root->first_child->prev_sibling_c : 0; // create parser on stack - xml_parser parser(alloc); + xml_parser parser(alloc_); // save last character and make buffer zero-terminated (speeds up parsing) char_t endch = buffer[length - 1]; @@ -2829,7 +2829,7 @@ PUGI__NS_BEGIN parser.parse_tree(buffer_data, root, optmsk, endch); // update allocator state - alloc = parser.alloc; + alloc_ = parser.alloc; xml_parse_result result = make_parse_result(parser.error_status, parser.error_offset ? parser.error_offset - buffer : 0); assert(result.offset >= 0 && static_cast(result.offset) <= length); @@ -3818,9 +3818,11 @@ PUGI__NS_BEGIN // free chunk chain while (chunk) { - xml_stream_chunk* next = chunk->next; + xml_stream_chunk* next_ = chunk->next; + xml_memory::deallocate(chunk); - chunk = next; + + chunk = next_; } } -- cgit v1.2.3