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
This commit is contained in:
parent
29e42bb25f
commit
f3ef88386c
1 changed files with 3 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue