Changeset 4491 in orxonox.OLD for orxonox/trunk/src/lib/tinyxml/tinystr.h
- Timestamp:
- Jun 3, 2005, 1:40:28 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/tinyxml/tinystr.h
r4261 r4491 32 32 33 33 #ifdef _MSC_VER 34 #pragma warning( disable : 4786 ) // Debugger truncating names. 34 #pragma warning( disable : 4530 ) 35 #pragma warning( disable : 4786 ) 35 36 #endif 36 37 … … 47 48 { 48 49 public : 49 // TiXmlString constructor, based on a string 50 TiXmlString (const char * instring); 50 // TiXmlString constructor, based on a string, mark explicit to force 51 // us to find unnecessary casting. 52 explicit TiXmlString (const char * instring); 51 53 52 54 // TiXmlString empty constructor … … 59 61 60 62 // TiXmlString copy constructor 61 TiXmlString (const TiXmlString& copy);63 explicit TiXmlString (const TiXmlString& copy); 62 64 63 65 // TiXmlString destructor … … 76 78 77 79 // Return the length of a TiXmlString 78 unsignedlength () const80 size_t length () const 79 81 { 80 82 return ( allocated ) ? current_length : 0; … … 108 110 } 109 111 bool operator == (const TiXmlString & compare) const; 112 bool operator == (const char* compare) const; 110 113 bool operator < (const TiXmlString & compare) const; 111 114 bool operator > (const TiXmlString & compare) const; … … 159 162 npos = notfound }; 160 163 161 void append (const char *str, int len );164 void append (const char *str, size_t len ); 162 165 163 166 protected : … … 166 169 char * cstring; 167 170 // Number of chars allocated 168 unsignedallocated;171 size_t allocated; 169 172 // Current string size 170 unsignedcurrent_length;173 size_t current_length; 171 174 172 175 // New size computation. It is simplistic right now : it returns twice the amount 173 176 // we need 174 unsigned assign_new_size (unsignedminimum_to_allocate)177 size_t assign_new_size (size_t minimum_to_allocate) 175 178 { 176 179 return minimum_to_allocate * 2; … … 239 242 } ; 240 243 244 #ifdef _MSC_VER 245 #pragma warning( default : 4530 ) 246 #pragma warning( default : 4786 ) 247 #endif 248 241 249 #endif // TIXML_STRING_INCLUDED 242 250 #endif // TIXML_USE_STL
Note: See TracChangeset
for help on using the changeset viewer.