removed overhead of clear error

This commit is contained in:
ngc92
2020-07-30 23:51:30 +03:00
parent 2c5a6bfdd4
commit 2c6a41a92e
2 changed files with 9 additions and 3 deletions

View File

@@ -2427,6 +2427,13 @@ void XMLDocument::Print( XMLPrinter* streamer ) const
}
void XMLDocument::ClearError() {
_errorID = XML_SUCCESS;
_errorLineNum = 0;
_errorStr.Reset();
}
void XMLDocument::SetError( XMLError error, int lineNum, const char* format, ... )
{
TIXMLASSERT( error >= 0 && error < XML_ERROR_COUNT );

View File

@@ -1873,9 +1873,8 @@ public:
*/
void DeleteNode( XMLNode* node );
void ClearError() {
SetError(XML_SUCCESS, 0, 0);
}
/// Clears the error flags.
void ClearError();
/// Return true if there was an error parsing the document.
bool Error() const {