TGB v1.7.5, upgrading TinyXML to v2.6.2
by Raphael Gervaise · in Torque Game Builder · 07/12/2011 (7:22 am) · 1 replies
Hi all !
I was writing some XML parsers in C++ using the version of TinyXML that ships with TGB v1.7.5. Unfortunately, I ran into some XML processing issues that were fixed in later versions.
As a result, I decided to upgrade the TinyXML used by my copy of TGB to the latest version, v2.6.2. No issue with that, and my XML files are now parsing properly :)
Nevertheless, as part of the changes, TinyXML dropped support for the "Data" tag, and kept only "Document", "Unknown", "Text", and a few others.
As far as I can tell, the TGB persistence doesn't seem to rely on the "Data" element at all, and only exposes it to the console. For now, and knowing that I won't be doing any XML parsing from scripts, I have simply disabled the AddData and GetData in SimXMLDocument.cpp
I'm not expecting any side-effects, but I thought I'd check with the community, in case someone more familiar with the engine source than I am can foresee possible issues with this modification.
Thoughts ?
thanks !
I was writing some XML parsers in C++ using the version of TinyXML that ships with TGB v1.7.5. Unfortunately, I ran into some XML processing issues that were fixed in later versions.
As a result, I decided to upgrade the TinyXML used by my copy of TGB to the latest version, v2.6.2. No issue with that, and my XML files are now parsing properly :)
Nevertheless, as part of the changes, TinyXML dropped support for the "Data" tag, and kept only "Document", "Unknown", "Text", and a few others.
As far as I can tell, the TGB persistence doesn't seem to rely on the "Data" element at all, and only exposes it to the console. For now, and knowing that I won't be doing any XML parsing from scripts, I have simply disabled the AddData and GetData in SimXMLDocument.cpp
I'm not expecting any side-effects, but I thought I'd check with the community, in case someone more familiar with the engine source than I am can foresee possible issues with this modification.
Thoughts ?
thanks !
About the author
Torque 3D Owner Raphael Gervaise
To work around this and preserve the memory reporting functionalities for the rest of the code, I rewrote the Init()/Quit() in tinistr.h to use ::operator new and ::operator delete, and wrap the block in a #undef new / #include <new> / #include "platform\platform.h" combo.