From c779ee05ce45505ab007990b1b11864923c03e81 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sun, 29 Aug 2010 15:03:15 +0000 Subject: Minor iterator refactoring git-svn-id: http://pugixml.googlecode.com/svn/trunk@635 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixml.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 88f7cc2..857d656 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -4153,8 +4153,7 @@ namespace pugi const xml_node_iterator& xml_node_iterator::operator--() { - if (_wrap._root) _wrap = _wrap.previous_sibling(); - else _wrap = _parent.last_child(); + _wrap = _wrap._root ? _wrap.previous_sibling() : _parent.last_child(); return *this; } @@ -4215,8 +4214,7 @@ namespace pugi const xml_attribute_iterator& xml_attribute_iterator::operator--() { - if (_wrap._attr) _wrap = _wrap.previous_attribute(); - else _wrap = _parent.last_attribute(); + _wrap = _wrap._attr ? _wrap.previous_attribute() : _parent.last_attribute(); return *this; } -- cgit v1.2.3