From 629147043e4b565dc08be1135956824cef4c076e Mon Sep 17 00:00:00 2001 From: Jean-Louis Date: Sun, 27 Dec 2020 18:13:49 +0100 Subject: [PATCH] XmlParser: Fixed an error message when the file was correctly parsed --- include/assimp/XmlParser.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/assimp/XmlParser.h b/include/assimp/XmlParser.h index 3d430a278..46bb57295 100644 --- a/include/assimp/XmlParser.h +++ b/include/assimp/XmlParser.h @@ -121,7 +121,6 @@ public: return false; } - bool result = false; const size_t len = stream->FileSize(); mData.resize(len + 1); memset(&mData[0], '\0', len + 1); @@ -130,11 +129,11 @@ public: mDoc = new pugi::xml_document(); pugi::xml_parse_result parse_result = mDoc->load_string(&mData[0], pugi::parse_full); if (parse_result.status == pugi::status_ok) { + return true; + } else { ASSIMP_LOG_DEBUG("Error while parse xml."); - result = true; + return false; } - - return result; } pugi::xml_document *getDocument() const {