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