diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2009-10-11 08:40:11 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2009-10-11 08:40:11 +0000 |
commit | f3ef88386c3d82e3cbc51e0b7c11958d09a43ea1 (patch) | |
tree | c145ef2db730644ea2ca12687989c9ae62a3181f /src/pugixml.cpp | |
parent | 29e42bb25fb717583d3d76652430f7170ae634c9 (diff) |
traverse now sets depth to -1 for both begin() and end()
git-svn-id: http://pugixml.googlecode.com/svn/trunk@146 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r-- | src/pugixml.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp index d214307..3a01c27 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -2588,7 +2588,7 @@ namespace pugi bool xml_node::traverse(xml_tree_walker& walker)
{
- walker._depth = 0;
+ walker._depth = -1;
if (!walker.begin(*this)) return false;
@@ -2596,6 +2596,8 @@ namespace pugi if (cur)
{
+ ++walker._depth;
+
do
{
if (!walker.for_each(cur))
|