diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-10-01 07:03:06 +0000 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-10-01 07:03:06 +0000 |
commit | b3f4277082a0a5b905dcdec0cea14aee6260319e (patch) | |
tree | 266d8cbb16035a250ca8d8f5773fe0b7d4543489 /src/pugixml.hpp | |
parent | 3ae516abe2d51415c9527f4f96e97b85413aa479 (diff) |
Disable document_order optimization after move/append_buffer.
Moving nodes results in node order being different from order of allocated
names/values; since move is O(1) we can't mark the moved nodes in a
subtree so we have to disable the optimization for the entire document.
Similarly, if a node is composed of multiple buffers, comparing nodes in
different buffers does not result in meaningful order.
Since we value correctness over performance, mark the entire document in
these cases to disable sorting optimization.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1034 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r-- | src/pugixml.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp index ba480cd..28b7aa3 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -926,7 +926,7 @@ namespace pugi private: char_t* _buffer; - // sizeof(xml_memory_page) + sizeof(xml_document_struct) + xml_memory_page_alignment + 1 void* in case compiler inserts padding + // sizeof(xml_memory_page) + sizeof(xml_document_struct) + xml_memory_page_alignment char _memory[sizeof(void*) * 20 + 64]; // Non-copyable semantics |