Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/leethomason/tinyxml2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Thomason <leethomason@gmail.com>2020-12-30 21:35:45 +0300
committerGitHub <noreply@github.com>2020-12-30 21:35:45 +0300
commit91bfd4b7fca1e404b68c1547a991690e350f7b27 (patch)
tree3ee047740109d9db0eee5230731c98e5a188ce26
parent4ec7320e570fc704513dcc29cb770c881f20a5c8 (diff)
parent2c6a41a92e69cc54182401814d523b5a6db661de (diff)
Merge pull request #827 from ngc92/ClearError
removed overhead of clear error
-rwxr-xr-xtinyxml2.cpp7
-rwxr-xr-xtinyxml2.h5
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 );
diff --git a/tinyxml2.h b/tinyxml2.h
index 558ac75..5da5f2a 100755
--- a/tinyxml2.h
+++ b/tinyxml2.h
@@ -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 {