Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4491 in orxonox.OLD for orxonox/trunk/src/lib/tinyxml/tinystr.h


Ignore:
Timestamp:
Jun 3, 2005, 1:40:28 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: new tinyXML-lib installed (v-2.3.4)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/tinyxml/tinystr.h

    r4261 r4491  
    3232
    3333#ifdef _MSC_VER
    34 #pragma warning( disable : 4786 )       // Debugger truncating names.
     34#pragma warning( disable : 4530 )
     35#pragma warning( disable : 4786 )
    3536#endif
    3637
     
    4748{
    4849  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);
    5153
    5254    // TiXmlString empty constructor
     
    5961
    6062    // TiXmlString copy constructor
    61     TiXmlString (const TiXmlString& copy);
     63    explicit TiXmlString (const TiXmlString& copy);
    6264
    6365    // TiXmlString destructor
     
    7678
    7779    // Return the length of a TiXmlString
    78     unsigned length () const
     80    size_t length () const
    7981        {
    8082                return ( allocated ) ? current_length : 0;
     
    108110    }
    109111    bool operator == (const TiXmlString & compare) const;
     112    bool operator == (const char* compare) const;
    110113    bool operator < (const TiXmlString & compare) const;
    111114    bool operator > (const TiXmlString & compare) const;
     
    159162            npos = notfound };
    160163
    161     void append (const char *str, int len );
     164    void append (const char *str, size_t len );
    162165
    163166  protected :
     
    166169    char * cstring;
    167170    // Number of chars allocated
    168     unsigned allocated;
     171    size_t allocated;
    169172    // Current string size
    170     unsigned current_length;
     173    size_t current_length;
    171174
    172175    // New size computation. It is simplistic right now : it returns twice the amount
    173176    // we need
    174     unsigned assign_new_size (unsigned minimum_to_allocate)
     177    size_t assign_new_size (size_t minimum_to_allocate)
    175178    {
    176179        return minimum_to_allocate * 2;
     
    239242} ;
    240243
     244#ifdef _MSC_VER
     245#pragma warning( default : 4530 )
     246#pragma warning( default : 4786 )
     247#endif
     248
    241249#endif  // TIXML_STRING_INCLUDED
    242250#endif  // TIXML_USE_STL
Note: See TracChangeset for help on using the changeset viewer.