one successful return type. simplify build on vs2015

This commit is contained in:
Lee Thomason
2016-06-04 19:10:53 -07:00
parent df4ffc00d6
commit 8553625730
5 changed files with 28 additions and 39 deletions

View File

@@ -1286,7 +1286,7 @@ void XMLAttribute::SetName( const char* n )
XMLError XMLAttribute::QueryIntValue( int* value ) const
{
if ( XMLUtil::ToInt( Value(), value )) {
return XML_NO_ERROR;
return XML_SUCCESS;
}
return XML_WRONG_ATTRIBUTE_TYPE;
}
@@ -1295,7 +1295,7 @@ XMLError XMLAttribute::QueryIntValue( int* value ) const
XMLError XMLAttribute::QueryUnsignedValue( unsigned int* value ) const
{
if ( XMLUtil::ToUnsigned( Value(), value )) {
return XML_NO_ERROR;
return XML_SUCCESS;
}
return XML_WRONG_ATTRIBUTE_TYPE;
}
@@ -1304,7 +1304,7 @@ XMLError XMLAttribute::QueryUnsignedValue( unsigned int* value ) const
XMLError XMLAttribute::QueryBoolValue( bool* value ) const
{
if ( XMLUtil::ToBool( Value(), value )) {
return XML_NO_ERROR;
return XML_SUCCESS;
}
return XML_WRONG_ATTRIBUTE_TYPE;
}
@@ -1313,7 +1313,7 @@ XMLError XMLAttribute::QueryBoolValue( bool* value ) const
XMLError XMLAttribute::QueryFloatValue( float* value ) const
{
if ( XMLUtil::ToFloat( Value(), value )) {
return XML_NO_ERROR;
return XML_SUCCESS;
}
return XML_WRONG_ATTRIBUTE_TYPE;
}
@@ -1322,7 +1322,7 @@ XMLError XMLAttribute::QueryFloatValue( float* value ) const
XMLError XMLAttribute::QueryDoubleValue( double* value ) const
{
if ( XMLUtil::ToDouble( Value(), value )) {
return XML_NO_ERROR;
return XML_SUCCESS;
}
return XML_WRONG_ATTRIBUTE_TYPE;
}
@@ -1771,7 +1771,7 @@ XMLDocument::XMLDocument( bool processEntities, Whitespace whitespace ) :
XMLNode( 0 ),
_writeBOM( false ),
_processEntities( processEntities ),
_errorID( XML_NO_ERROR ),
_errorID(XML_SUCCESS),
_whitespace( whitespace ),
_errorStr1( 0 ),
_errorStr2( 0 ),
@@ -1795,7 +1795,7 @@ void XMLDocument::Clear()
#ifdef DEBUG
const bool hadError = Error();
#endif
_errorID = XML_NO_ERROR;
_errorID = XML_SUCCESS;
_errorStr1 = 0;
_errorStr2 = 0;
@@ -2000,7 +2000,7 @@ XMLError XMLDocument::SaveFile( FILE* fp, bool compact )
{
// Clear any error from the last save, otherwise it will get reported
// for *this* call.
SetError( XML_NO_ERROR, 0, 0 );
SetError(XML_SUCCESS, 0, 0);
XMLPrinter stream( fp, compact );
Print( &stream );
return _errorID;