summaryrefslogtreecommitdiff
path: root/src/pugixml.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-09-15 02:41:42 +0000
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-09-15 02:41:42 +0000
commit6e1c9ec7d1c52afe25a7f51c66cd5d5cad75ddc8 (patch)
tree821ec488e9b89a12fc1ed66b71cf4b6efd4c3235 /src/pugixml.cpp
parentfbfe207fe6d838c37e69d7eb1ecc24564747b273 (diff)
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
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r--src/pugixml.cpp12
1 files changed, 7 insertions, 5 deletions
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<xml_allocator*>(xmldoc);
+ xml_allocator& alloc_ = *static_cast<xml_allocator*>(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<size_t>(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_;
}
}