From 6df0cae189bc773dbeee5c5c917e7f22bf3808e6 Mon Sep 17 00:00:00 2001
From: Pantelis Lekakis
Date: Tue, 8 Sep 2020 00:40:44 +0100
Subject: [PATCH 1/2] - Allowing TIXMLASERT to be defined before including the
main header. - Fix for enum bitmask usage
---
tinyxml2.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tinyxml2.h b/tinyxml2.h
index 003ef43..f0cfbcc 100755
--- a/tinyxml2.h
+++ b/tinyxml2.h
@@ -79,6 +79,7 @@ distribution.
#endif
+#if !defined(TIXMLASSERT)
#if defined(TINYXML2_DEBUG)
# if defined(_MSC_VER)
# // "(void)0," is for suppressing C4127 warning in "assert(false)", "assert(true)" and the like
@@ -93,7 +94,7 @@ distribution.
#else
# define TIXMLASSERT( x ) {}
#endif
-
+#endif
/* Versioning, past 1.0.14:
http://semver.org/
@@ -135,7 +136,7 @@ class XMLPrinter;
class TINYXML2_LIB StrPair
{
public:
- enum {
+ enum Mode : uint32_t {
NEEDS_ENTITY_PROCESSING = 0x01,
NEEDS_NEWLINE_NORMALIZATION = 0x02,
NEEDS_WHITESPACE_COLLAPSING = 0x04,
From c87bf8187d923c0c24badff0d1706cab34eb26e7 Mon Sep 17 00:00:00 2001
From: Pantelis Lekakis
Date: Wed, 23 Sep 2020 21:59:13 +0100
Subject: [PATCH 2/2] reverted the strong typed enum change
---
tinyxml2.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tinyxml2.h b/tinyxml2.h
index f0cfbcc..558ac75 100755
--- a/tinyxml2.h
+++ b/tinyxml2.h
@@ -136,7 +136,7 @@ class XMLPrinter;
class TINYXML2_LIB StrPair
{
public:
- enum Mode : uint32_t {
+ enum Mode {
NEEDS_ENTITY_PROCESSING = 0x01,
NEEDS_NEWLINE_NORMALIZATION = 0x02,
NEEDS_WHITESPACE_COLLAPSING = 0x04,