From cb1cfd9ecd46170798a0117da18579131ae6a581 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 6 Oct 2023 01:37:51 +0200 Subject: [PATCH] Test --- src/xml/xmlparser.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xml/xmlparser.cpp b/src/xml/xmlparser.cpp index 40c4ded3..e5180a2b 100644 --- a/src/xml/xmlparser.cpp +++ b/src/xml/xmlparser.cpp @@ -82,6 +82,13 @@ static void deinitXML() { XMLParser::XMLParser(Common::ReadStream &stream, bool makeLower, const Common::UString &fileName) { fprintf(stderr, "FOO1\n"); initXML(); + + BOOST_SCOPE_EXIT(void) { + fprintf(stderr, "FOO13\n"); + deinitXML(); + fprintf(stderr, "FOO14\n"); + } BOOST_SCOPE_EXIT_END + fprintf(stderr, "FOO2\n"); //kParseError.clear(); @@ -121,9 +128,6 @@ XMLParser::XMLParser(Common::ReadStream &stream, bool makeLower, const Common::U _rootNode.reset(new XMLNode(*root, makeLower)); fprintf(stderr, "FOO12\n"); - - deinitXML(); - fprintf(stderr, "FOO13\n"); } XMLParser::~XMLParser() {