From 216140bd0109a1c0829f9296b5abd971bee263c7 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Sat, 14 Nov 2015 18:19:33 +0100
Subject: [PATCH 7/7] Rename TiXmlNode::ELEMENT and ::TEXT
Tinyxml 2.6 renamed it and this fixes build against that version
available system-wide. We could update the in-tre version as well, but
this seems like a lesser effort.
---
src/core/AtanuaConfig.cpp | 4 ++--
src/core/fileio.cpp | 12 ++++++------
src/core/pluginchipfactory.cpp | 4 ++--
src/tinyxml_2_5_3/tinyxml/tinyxml.cpp | 6 +++---
src/tinyxml_2_5_3/tinyxml/tinyxml.h | 10 +++++-----
5 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/core/AtanuaConfig.cpp b/src/core/AtanuaConfig.cpp
index dd7d64f..acc5d83 100644
--- a/src/core/AtanuaConfig.cpp
+++ b/src/core/AtanuaConfig.cpp
@@ -191,14 +191,14 @@ void AtanuaConfig::load()
TiXmlNode *root;
for (root = doc.FirstChild(); root != 0; root = root->NextSibling())
{
- if (root->Type() == TiXmlNode::ELEMENT)
+ if (root->Type() == TiXmlNode::TINYXML_ELEMENT)
{
if (stricmp(root->Value(), "AtanuaConfig")==0)
{
TiXmlNode *part;
for (part = root->FirstChild(); part != 0; part = part->NextSibling())
{
- if (part->Type() == TiXmlNode::ELEMENT)
+ if (part->Type() == TiXmlNode::TINYXML_ELEMENT)
{
if (stricmp(part->Value(), "FontSystem") == 0)
diff --git a/src/core/fileio.cpp b/src/core/fileio.cpp
index a5866f8..d37bd9a 100644
--- a/src/core/fileio.cpp
+++ b/src/core/fileio.cpp
@@ -327,7 +327,7 @@ void do_loadxml(FILE * f, int box)
for (pChild = doc.FirstChild(); pChild != 0; pChild = pChild->NextSibling())
{
- if (pChild->Type() == TiXmlNode::ELEMENT)
+ if (pChild->Type() == TiXmlNode::TINYXML_ELEMENT)
{
if (stricmp(pChild->Value(), "Atanua") == 0)
{
@@ -338,7 +338,7 @@ void do_loadxml(FILE * f, int box)
TiXmlNode *part;
for (part = pChild->FirstChild(); part != 0; part = part->NextSibling())
{
- if (part->Type() == TiXmlNode::ELEMENT)
+ if (part->Type() == TiXmlNode::TINYXML_ELEMENT)
{
if (stricmp(part->Value(), "Chip")==0)
{
@@ -421,7 +421,7 @@ void do_loadxml(FILE * f, int box)
TiXmlNode *text;
for (text = part->FirstChild(); text != 0; text = text->NextSibling())
{
- if (text->Type() == TiXmlNode::TEXT)
+ if (text->Type() == TiXmlNode::TINYXML_TEXT)
{
MemoryFile f;
@@ -731,7 +731,7 @@ void do_loadxmltobinary(FILE * f, File * outf, BoxcacheData * bd)
for (pChild = doc.FirstChild(); pChild != 0; pChild = pChild->NextSibling())
{
- if (pChild->Type() == TiXmlNode::ELEMENT)
+ if (pChild->Type() == TiXmlNode::TINYXML_ELEMENT)
{
if (stricmp(pChild->Value(), "Atanua") == 0)
{
@@ -751,7 +751,7 @@ void do_loadxmltobinary(FILE * f, File * outf, BoxcacheData * bd)
TiXmlNode *part;
for (part = pChild->FirstChild(); part != 0; part = part->NextSibling())
{
- if (part->Type() == TiXmlNode::ELEMENT)
+ if (part->Type() == TiXmlNode::TINYXML_ELEMENT)
{
if (stricmp(part->Value(), "Chip")==0)
{
@@ -832,7 +832,7 @@ void do_loadxmltobinary(FILE * f, File * outf, BoxcacheData * bd)
TiXmlNode *text;
for (text = part->FirstChild(); text != 0; text = text->NextSibling())
{
- if (text->Type() == TiXmlNode::TEXT)
+ if (text->Type() == TiXmlNode::TINYXML_TEXT)
{
const char *v = text->Value();
int wholebyte = 0;
diff --git a/src/core/pluginchipfactory.cpp b/src/core/pluginchipfactory.cpp
index 01a9192..5e7ee32 100644
--- a/src/core/pluginchipfactory.cpp
+++ b/src/core/pluginchipfactory.cpp
@@ -44,14 +44,14 @@ PluginChipFactory::PluginChipFactory()
TiXmlNode *root;
for (root = doc.FirstChild(); root != 0; root = root->NextSibling())
{
- if (root->Type() == TiXmlNode::ELEMENT)
+ if (root->Type() == TiXmlNode::TINYXML_ELEMENT)
{
if (stricmp(root->Value(), "AtanuaConfig")==0)
{
TiXmlNode *part;
for (part = root->FirstChild(); part != 0; part = part->NextSibling())
{
- if (part->Type() == TiXmlNode::ELEMENT)
+ if (part->Type() == TiXmlNode::TINYXML_ELEMENT)
{
if (stricmp(part->Value(), "Plugin") == 0)
{
diff --git a/src/tinyxml_2_5_3/tinyxml/tinyxml.cpp b/src/tinyxml_2_5_3/tinyxml/tinyxml.cpp
index 5de21f6..09e9686 100644
--- a/src/tinyxml_2_5_3/tinyxml/tinyxml.cpp
+++ b/src/tinyxml_2_5_3/tinyxml/tinyxml.cpp
@@ -502,7 +502,7 @@ const TiXmlDocument* TiXmlNode::GetDocument() const
TiXmlElement::TiXmlElement (const char * _value)
- : TiXmlNode( TiXmlNode::ELEMENT )
+ : TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
{
firstChild = lastChild = 0;
value = _value;
@@ -511,7 +511,7 @@ TiXmlElement::TiXmlElement (const char * _value)
#ifdef TIXML_USE_STL
TiXmlElement::TiXmlElement( const std::string& _value )
- : TiXmlNode( TiXmlNode::ELEMENT )
+ : TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
{
firstChild = lastChild = 0;
value = _value;
@@ -520,7 +520,7 @@ TiXmlElement::TiXmlElement( const std::string& _value )
TiXmlElement::TiXmlElement( const TiXmlElement& copy)
- : TiXmlNode( TiXmlNode::ELEMENT )
+ : TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
{
firstChild = lastChild = 0;
copy.CopyTo( this );
diff --git a/src/tinyxml_2_5_3/tinyxml/tinyxml.h b/src/tinyxml_2_5_3/tinyxml/tinyxml.h
index c6f40cc..2f9e25e 100644
--- a/src/tinyxml_2_5_3/tinyxml/tinyxml.h
+++ b/src/tinyxml_2_5_3/tinyxml/tinyxml.h
@@ -463,10 +463,10 @@ public:
enum NodeType
{
DOCUMENT,
- ELEMENT,
+ TINYXML_ELEMENT,
COMMENT,
UNKNOWN,
- TEXT,
+ TINYXML_TEXT,
DECLARATION,
TYPECOUNT
};
@@ -1209,7 +1209,7 @@ public:
normal, encoded text. If you want it be output as a CDATA text
element, set the parameter _cdata to 'true'
*/
- TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TEXT)
+ TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)
{
SetValue( initValue );
cdata = false;
@@ -1218,14 +1218,14 @@ public:
#ifdef TIXML_USE_STL
/// Constructor.
- TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TEXT)
+ TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)
{
SetValue( initValue );
cdata = false;
}
#endif
- TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TEXT ) { copy.CopyTo( this ); }
+ TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT ) { copy.CopyTo( this ); }
void operator=( const TiXmlText& base ) { base.CopyTo( this ); }
// Write this text object to a FILE stream.
--
2.5.0