mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Update TinyXML2 to 9.0.0
This updates TinyXML2 to the major release tagged on June 6, 2021.
This commit is contained in:
39
third_party/tinyxml2/tinyxml2.h
vendored
39
third_party/tinyxml2/tinyxml2.h
vendored
@@ -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,16 +94,16 @@ distribution.
|
||||
#else
|
||||
# define TIXMLASSERT( x ) {}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Versioning, past 1.0.14:
|
||||
http://semver.org/
|
||||
*/
|
||||
static const int TIXML2_MAJOR_VERSION = 8;
|
||||
static const int TIXML2_MAJOR_VERSION = 9;
|
||||
static const int TIXML2_MINOR_VERSION = 0;
|
||||
static const int TIXML2_PATCH_VERSION = 0;
|
||||
|
||||
#define TINYXML2_MAJOR_VERSION 8
|
||||
#define TINYXML2_MAJOR_VERSION 9
|
||||
#define TINYXML2_MINOR_VERSION 0
|
||||
#define TINYXML2_PATCH_VERSION 0
|
||||
|
||||
@@ -135,7 +136,7 @@ class XMLPrinter;
|
||||
class TINYXML2_LIB StrPair
|
||||
{
|
||||
public:
|
||||
enum {
|
||||
enum Mode {
|
||||
NEEDS_ENTITY_PROCESSING = 0x01,
|
||||
NEEDS_NEWLINE_NORMALIZATION = 0x02,
|
||||
NEEDS_WHITESPACE_COLLAPSING = 0x04,
|
||||
@@ -590,6 +591,11 @@ public:
|
||||
|| ch == '-';
|
||||
}
|
||||
|
||||
inline static bool IsPrefixHex( const char* p) {
|
||||
p = SkipWhiteSpace(p, 0);
|
||||
return p && *p == '0' && ( *(p + 1) == 'x' || *(p + 1) == 'X');
|
||||
}
|
||||
|
||||
inline static bool StringEqual( const char* p, const char* q, int nChar=INT_MAX ) {
|
||||
if ( p == q ) {
|
||||
return true;
|
||||
@@ -1451,6 +1457,10 @@ public:
|
||||
return QueryFloatAttribute( name, value );
|
||||
}
|
||||
|
||||
XMLError QueryAttribute(const char* name, const char** value) const {
|
||||
return QueryStringAttribute(name, value);
|
||||
}
|
||||
|
||||
/// Sets the named attribute to value.
|
||||
void SetAttribute( const char* name, const char* value ) {
|
||||
XMLAttribute* a = FindOrCreateAttribute( name );
|
||||
@@ -1478,7 +1488,7 @@ public:
|
||||
XMLAttribute* a = FindOrCreateAttribute(name);
|
||||
a->SetAttribute(value);
|
||||
}
|
||||
|
||||
|
||||
/// Sets the named attribute to value.
|
||||
void SetAttribute( const char* name, bool value ) {
|
||||
XMLAttribute* a = FindOrCreateAttribute( name );
|
||||
@@ -1864,9 +1874,8 @@ public:
|
||||
*/
|
||||
void DeleteNode( XMLNode* node );
|
||||
|
||||
void ClearError() {
|
||||
SetError(XML_SUCCESS, 0, 0);
|
||||
}
|
||||
/// Clears the error flags.
|
||||
void ClearError();
|
||||
|
||||
/// Return true if there was an error parsing the document.
|
||||
bool Error() const {
|
||||
@@ -2322,16 +2331,22 @@ protected:
|
||||
the space and tabs used. A PrintSpace() override should call Print().
|
||||
*/
|
||||
virtual void PrintSpace( int depth );
|
||||
void Print( const char* format, ... );
|
||||
void Write( const char* data, size_t size );
|
||||
inline void Write( const char* data ) { Write( data, strlen( data ) ); }
|
||||
void Putc( char ch );
|
||||
virtual void Print( const char* format, ... );
|
||||
virtual void Write( const char* data, size_t size );
|
||||
virtual void Putc( char ch );
|
||||
|
||||
inline void Write(const char* data) { Write(data, strlen(data)); }
|
||||
|
||||
void SealElementIfJustOpened();
|
||||
bool _elementJustOpened;
|
||||
DynArray< const char*, 10 > _stack;
|
||||
|
||||
private:
|
||||
/**
|
||||
Prepares to write a new node. This includes sealing an element that was
|
||||
just opened, and writing any whitespace necessary if not in compact mode.
|
||||
*/
|
||||
void PrepareForNewNode( bool compactMode );
|
||||
void PrintString( const char*, bool restrictedEntitySet ); // prints out, after detecting entities.
|
||||
|
||||
bool _firstElement;
|
||||
|
||||
Reference in New Issue
Block a user