Changeset 1634 for code/branches/gcc43/src/tinyxml/tinystr.h
- Timestamp:
- Jun 29, 2008, 7:36:33 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gcc43/src/tinyxml/tinystr.h
r1505 r1634 267 267 268 268 269 inlinebool operator == (const TiXmlString & a, const TiXmlString & b)269 bool operator == (const TiXmlString & a, const TiXmlString & b) 270 270 { 271 271 return ( a.length() == b.length() ) // optimization on some platforms 272 272 && ( strcmp(a.c_str(), b.c_str()) == 0 ); // actual compare 273 273 } 274 inlinebool operator < (const TiXmlString & a, const TiXmlString & b)274 bool operator < (const TiXmlString & a, const TiXmlString & b) 275 275 { 276 276 return strcmp(a.c_str(), b.c_str()) < 0; 277 277 } 278 278 279 inlinebool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); }280 inlinebool operator > (const TiXmlString & a, const TiXmlString & b) { return b < a; }281 inlinebool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); }282 inlinebool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); }283 284 inlinebool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; }285 inlinebool operator == (const char* a, const TiXmlString & b) { return b == a; }286 inlinebool operator != (const TiXmlString & a, const char* b) { return !(a == b); }287 inlinebool operator != (const char* a, const TiXmlString & b) { return !(b == a); }279 bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); } 280 bool operator > (const TiXmlString & a, const TiXmlString & b) { return b < a; } 281 bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); } 282 bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); } 283 284 bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; } 285 bool operator == (const char* a, const TiXmlString & b) { return b == a; } 286 bool operator != (const TiXmlString & a, const char* b) { return !(a == b); } 287 bool operator != (const char* a, const TiXmlString & b) { return !(b == a); } 288 288 289 289 TiXmlString operator + (const TiXmlString & a, const TiXmlString & b);
Note: See TracChangeset
for help on using the changeset viewer.