Minor iterator refactoring
git-svn-id: http://pugixml.googlecode.com/svn/trunk@635 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
b88cf138f9
commit
c779ee05ce
@ -4153,8 +4153,7 @@ namespace pugi
|
|||||||
|
|
||||||
const xml_node_iterator& xml_node_iterator::operator--()
|
const xml_node_iterator& xml_node_iterator::operator--()
|
||||||
{
|
{
|
||||||
if (_wrap._root) _wrap = _wrap.previous_sibling();
|
_wrap = _wrap._root ? _wrap.previous_sibling() : _parent.last_child();
|
||||||
else _wrap = _parent.last_child();
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4215,8 +4214,7 @@ namespace pugi
|
|||||||
|
|
||||||
const xml_attribute_iterator& xml_attribute_iterator::operator--()
|
const xml_attribute_iterator& xml_attribute_iterator::operator--()
|
||||||
{
|
{
|
||||||
if (_wrap._attr) _wrap = _wrap.previous_attribute();
|
_wrap = _wrap._attr ? _wrap.previous_attribute() : _parent.last_attribute();
|
||||||
else _wrap = _parent.last_attribute();
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user