fix warnings

unwrap some ifs
This commit is contained in:
Glenn Maynard
2004-02-09 19:33:56 +00:00
parent 485d75cbbe
commit 445c953785
+21 -17
View File
@@ -266,8 +266,10 @@ LPTSTR _tagXMLNode::LoadAttributes( LPCTSTR pszAttrs , LPPARSEINFO pi /*= &piDef
while( xml && *xml ) while( xml && *xml )
{ {
if( xml = _tcsskip( xml ) ) xml = _tcsskip( xml );
{ if( !xml )
continue;
// close tag // close tag
if( *xml == chXMLTagClose || *xml == chXMLTagPre ) if( *xml == chXMLTagClose || *xml == chXMLTagPre )
// wel-formed tag // wel-formed tag
@@ -299,13 +301,16 @@ LPTSTR _tagXMLNode::LoadAttributes( LPCTSTR pszAttrs , LPPARSEINFO pi /*= &piDef
xml = pEnd; xml = pEnd;
// XML Attr Value // XML Attr Value
if( xml = _tcsskip( xml ) ) xml = _tcsskip( xml );
{ if( !xml )
continue;
//if( xml = _tcschr( xml, '=' ) ) //if( xml = _tcschr( xml, '=' ) )
if( *xml == '=' ) if( *xml == '=' )
{ {
if( xml = _tcsskip( ++xml ) ) xml = _tcsskip( ++xml );
{ if( !xml )
continue;
// if " or ' // if " or '
// or none quote // or none quote
int quote = *xml; int quote = *xml;
@@ -332,9 +337,6 @@ LPTSTR _tagXMLNode::LoadAttributes( LPCTSTR pszAttrs , LPPARSEINFO pi /*= &piDef
xml++; xml++;
} }
} }
}
}
}
// not wel-formed tag // not wel-formed tag
return NULL; return NULL;
@@ -376,8 +378,10 @@ LPTSTR _tagXMLNode::Load( LPCTSTR pszXml, LPPARSEINFO pi /*= &piDefault*/ )
_SetString( xml, pTagEnd, &name ); _SetString( xml, pTagEnd, &name );
xml = pTagEnd; xml = pTagEnd;
// Generate XML Attributte List // Generate XML Attributte List
if( xml = LoadAttributes( xml, pi ) ) xml = LoadAttributes( xml, pi );
{ if( xml == NULL )
return NULL;
// alone tag <TAG ... /> // alone tag <TAG ... />
if( *xml == chXMLTagPre ) if( *xml == chXMLTagPre )
{ {
@@ -403,7 +407,7 @@ LPTSTR _tagXMLNode::Load( LPCTSTR pszXml, LPPARSEINFO pi /*= &piDefault*/ )
// open/close tag <TAG ..> ... </TAG> // open/close tag <TAG ..> ... </TAG>
// ^- current pointer // ^- current pointer
{ {
// text value가 없으면 넣도록한다. // text value°¡ ¾øÀ¸¸E³Öµµ·ÏÇÑ´Ù.
//if( this->value.IsEmpty() || this->value == ("") ) //if( this->value.IsEmpty() || this->value == ("") )
if( XIsEmptyString( value ) ) if( XIsEmptyString( value ) )
{ {
@@ -457,8 +461,10 @@ LPTSTR _tagXMLNode::Load( LPCTSTR pszXml, LPPARSEINFO pi /*= &piDefault*/ )
// </Close> // </Close>
xml+=2; // C xml+=2; // C
if( xml = _tcsskip( xml ) ) xml = _tcsskip( xml );
{ if( xml == NULL )
return NULL;
CString closename; CString closename;
TCHAR* pEnd = _tcspbrk( xml, " >" ); TCHAR* pEnd = _tcspbrk( xml, " >" );
if( pEnd == NULL ) if( pEnd == NULL )
@@ -496,9 +502,8 @@ LPTSTR _tagXMLNode::Load( LPCTSTR pszXml, LPPARSEINFO pi /*= &piDefault*/ )
return NULL; return NULL;
} }
} }
}
else // Alone child Tag Loaded else // Alone child Tag Loaded
// else 해야하는지 말아야하는지 의심간다. // else ÇØ¾ßÇÏ´ÂÁE¸»¾Æ¾ßÇÏ´ÂÁEÀǽɰ£´Ù.
{ {
//if( xml && this->value.IsEmpty() && *xml !=chXMLTagOpen ) //if( xml && this->value.IsEmpty() && *xml !=chXMLTagOpen )
@@ -532,7 +537,6 @@ LPTSTR _tagXMLNode::Load( LPCTSTR pszXml, LPPARSEINFO pi /*= &piDefault*/ )
} }
} }
} }
}
return xml; return xml;
} }