Skip to content

Commit ac4e25f

Browse files
authored
Tinyxml2 fix leaking consts (#122)
* Fixed leaking consts from tinyxml2
1 parent eceb939 commit ac4e25f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

External/tinyxml2.README.md

+25
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,31 @@ The following files have been copied to `External/tinyxml2`:
1414
- `LICENSE.txt`
1515
- `readme.txt`
1616

17+
### Applied the following patch to hide leaking consts
18+
19+
```
20+
diff --git a/External/tinyxml2/tinyxml2.cpp b/External/tinyxml2/tinyxml2.cpp
21+
index 083f54b..db7b53b 100644
22+
--- a/External/tinyxml2/tinyxml2.cpp
23+
+++ b/External/tinyxml2/tinyxml2.cpp
24+
@@ -119,6 +119,8 @@ distribution.
25+
#define TIXML_FTELL ftell
26+
#endif
27+
28+
+namespace
29+
+{
30+
31+
static const char LINE_FEED = static_cast<char>(0x0a); // all line endings are normalized to LF
32+
static const char LF = LINE_FEED;
33+
@@ -135,6 +137,8 @@ static const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
34+
static const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
35+
static const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;
36+
37+
+}
38+
+
39+
namespace tinyxml2
40+
{
41+
```
1742
## Usage
1843
`tinyxml2` is referenced by source and built together with the target.
1944

External/tinyxml2/tinyxml2.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ distribution.
119119
#define TIXML_FTELL ftell
120120
#endif
121121

122+
namespace
123+
{
122124

123125
static const char LINE_FEED = static_cast<char>(0x0a); // all line endings are normalized to LF
124126
static const char LF = LINE_FEED;
@@ -135,6 +137,8 @@ static const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
135137
static const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
136138
static const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;
137139

140+
}
141+
138142
namespace tinyxml2
139143
{
140144

0 commit comments

Comments
 (0)