From 3659fe1d33b1089a6dc24b63e1cf08ef3f9648a2 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Thu, 4 Sep 2014 11:33:49 +0400 Subject: [PATCH] Move loop variable definition into loop headers --- tinyxml2.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index ae1c8a9..9e310de 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -1218,8 +1218,7 @@ XMLElement::~XMLElement() XMLAttribute* XMLElement::FindAttribute( const char* name ) { - XMLAttribute* a = 0; - for( a=_rootAttribute; a; a = a->_next ) { + for( XMLAttribute* a = _rootAttribute; a; a = a->_next ) { if ( XMLUtil::StringEqual( a->Name(), name ) ) { return a; } @@ -1230,8 +1229,7 @@ XMLAttribute* XMLElement::FindAttribute( const char* name ) const XMLAttribute* XMLElement::FindAttribute( const char* name ) const { - XMLAttribute* a = 0; - for( a=_rootAttribute; a; a = a->_next ) { + for( XMLAttribute* a = _rootAttribute; a; a = a->_next ) { if ( XMLUtil::StringEqual( a->Name(), name ) ) { return a; }