mirror of
https://github.com/AxioDL/tinyxml2.git
synced 2025-06-07 07:03:41 +00:00
Move loop variable definition into loop headers
This commit is contained in:
parent
cf6d886903
commit
3659fe1d33
@ -1218,8 +1218,7 @@ XMLElement::~XMLElement()
|
|||||||
|
|
||||||
XMLAttribute* XMLElement::FindAttribute( const char* name )
|
XMLAttribute* XMLElement::FindAttribute( const char* name )
|
||||||
{
|
{
|
||||||
XMLAttribute* a = 0;
|
for( XMLAttribute* a = _rootAttribute; a; a = a->_next ) {
|
||||||
for( a=_rootAttribute; a; a = a->_next ) {
|
|
||||||
if ( XMLUtil::StringEqual( a->Name(), name ) ) {
|
if ( XMLUtil::StringEqual( a->Name(), name ) ) {
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
@ -1230,8 +1229,7 @@ XMLAttribute* XMLElement::FindAttribute( const char* name )
|
|||||||
|
|
||||||
const XMLAttribute* XMLElement::FindAttribute( const char* name ) const
|
const XMLAttribute* XMLElement::FindAttribute( const char* name ) const
|
||||||
{
|
{
|
||||||
XMLAttribute* a = 0;
|
for( XMLAttribute* a = _rootAttribute; a; a = a->_next ) {
|
||||||
for( a=_rootAttribute; a; a = a->_next ) {
|
|
||||||
if ( XMLUtil::StringEqual( a->Name(), name ) ) {
|
if ( XMLUtil::StringEqual( a->Name(), name ) ) {
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user