From 3163b3887ab44eea3630e9a5e14de2aa0fa13d9a Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 1 May 2013 01:20:29 +0000 Subject: [PATCH] fix the unit tests that didn't work on some compilers handling static cast of enums in a weird way --- source/shared_lib/sources/xml/xml_parser.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/shared_lib/sources/xml/xml_parser.cpp b/source/shared_lib/sources/xml/xml_parser.cpp index d0a422c15..7c53181d4 100644 --- a/source/shared_lib/sources/xml/xml_parser.cpp +++ b/source/shared_lib/sources/xml/xml_parser.cpp @@ -465,18 +465,19 @@ void XmlIoRapid::save(const string &path, const XmlNode *node){ // ===================================================== XmlTree::XmlTree(xml_engine_parser_type engine_type) { rootNode= NULL; - this->engine_type = engine_type; - this->skipStackCheck = false; - switch(this->engine_type) { + switch(engine_type) { case XML_XERCES_ENGINE: break; case XML_RAPIDXML_ENGINE: break; default: - throw megaglest_runtime_error("Invalid XML parser engine: " + intToStr(this->engine_type)); + throw megaglest_runtime_error("Invalid XML parser engine: " + intToStr(engine_type)); } + + this->engine_type = engine_type; + this->skipStackCheck = false; } void XmlTree::init(const string &name){