diff options
author | Lee Thomason <leethomason@gmail.com> | 2020-12-30 21:35:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 21:35:45 +0300 |
commit | 91bfd4b7fca1e404b68c1547a991690e350f7b27 (patch) | |
tree | 3ee047740109d9db0eee5230731c98e5a188ce26 | |
parent | 4ec7320e570fc704513dcc29cb770c881f20a5c8 (diff) | |
parent | 2c6a41a92e69cc54182401814d523b5a6db661de (diff) |
Merge pull request #827 from ngc92/ClearError
removed overhead of clear error
-rwxr-xr-x | tinyxml2.cpp | 7 | ||||
-rwxr-xr-x | tinyxml2.h | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 8169624..7c4e7b7 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -2455,6 +2455,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 );
@@ -1874,9 +1874,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 {
|