Merge branch 'master' of https://github.com/netcan/tinyxml2 into netcan-master

This commit is contained in:
Lee Thomason
2020-06-13 17:26:30 -07:00
3 changed files with 30 additions and 5 deletions

View File

@@ -590,6 +590,13 @@ public:
|| ch == '-';
}
inline static bool IsPrefixHex( const char* p) {
while (p && *p != '\0' && !isdigit(*p)) {
++p;
}
return *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;
@@ -1478,7 +1485,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 );