diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-11-04 19:25:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-11-04 19:25:32 +0300 |
commit | c3bf414ad5d80a1ffcae0f19357753f0ef26a00f (patch) | |
tree | 209d16edf5ee2fedd6be31040d02b63cd2adc6f9 /src | |
parent | 26459f06e92ba611a61d4dcaf9df1992f6de5e4d (diff) | |
download | manaplus-c3bf414ad5d80a1ffcae0f19357753f0ef26a00f.tar.gz manaplus-c3bf414ad5d80a1ffcae0f19357753f0ef26a00f.tar.bz2 manaplus-c3bf414ad5d80a1ffcae0f19357753f0ef26a00f.tar.xz manaplus-c3bf414ad5d80a1ffcae0f19357753f0ef26a00f.zip |
Add workaround for fix compilation with tinyxml2 from master branch.s20171107
In tinyxml2 was unversioned api breakage in master branch.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 7 | ||||
-rw-r--r-- | src/utils/xml/tinyxml2.cpp | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 9674e0e2b..d5a37af0f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -95,6 +95,10 @@ endif if ENABLE_TINYXML2 manaplus_CXXFLAGS += -DENABLE_TINYXML2 dyecmd_CXXFLAGS += -DENABLE_TINYXML2 +if USE_TINYXML_OLD +manaplus_CXXFLAGS += -DUSE_TINYXML_OLD +dyecmd_CXXFLAGS += -DUSE_TINYXML_OLD +endif endif if ENABLE_PORTABLE @@ -2048,6 +2052,9 @@ manaplustests_CXXFLAGS += -DENABLE_LIBXML endif if ENABLE_TINYXML2 manaplustests_CXXFLAGS += -DENABLE_TINYXML2 +if USE_TINYXML_OLD +manaplustests_CXXFLAGS += -DUSE_TINYXML_OLD +endif endif if USE_SDL2 manaplustests_CXXFLAGS += -DUSE_SDL2 diff --git a/src/utils/xml/tinyxml2.cpp b/src/utils/xml/tinyxml2.cpp index a7275b7f1..913e0e953 100644 --- a/src/utils/xml/tinyxml2.cpp +++ b/src/utils/xml/tinyxml2.cpp @@ -44,10 +44,17 @@ namespace XML { static void showErrorStatus(tinyxml2::XMLDocument &doc) { +#ifdef USE_TINYXML_OLD logger->log("xml error: %s, in lines: %s\n%s", doc.ErrorName(), doc.GetErrorStr1(), doc.GetErrorStr2()); +#else // USE_TINYXML_OLD + + logger->log("xml error: %s, in lines: %s", + doc.ErrorName(), + doc.ErrorStr()); +#endif // USE_TINYXML_OLD } Document::Document(const std::string &filename, |