(file) Return to Buffer.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/Buffer.h between version 1.4 and 1.4.2.1

version 1.4, 2006/01/30 16:16:46 version 1.4.2.1, 2006/07/28 20:06:32
Line 69 
Line 69 
  
     size_t capacity() const;     size_t capacity() const;
  
       /**
           Returns a pointer to a character buffer with the Buffer contents.
           The character buffer is null-terminated even if the Buffer contents
           do not include a null termination character.
        */
     const char* getData() const;     const char* getData() const;
  
     char get(size_t i) const;     char get(size_t i) const;
Line 114 
Line 119 
  
 inline Buffer::~Buffer() inline Buffer::~Buffer()
 { {
     if (_rep != &_empty_rep)      if (_rep->cap != 0)
         free(_rep);         free(_rep);
 } }
  
Line 137 
Line 142 
  
 inline const char* Buffer::getData() const inline const char* Buffer::getData() const
 { {
       if (_rep->cap == 0)
       {
           const_cast<Buffer*>(this)->_append_char_aux();
       }
   
       _rep->data[_rep->size] = '\0';
   
     return _rep->data;     return _rep->data;
 } }
  
Line 193 
Line 205 
  
 inline void Buffer::clear() inline void Buffer::clear()
 { {
     if (_rep != &_empty_rep)      if (_rep->cap != 0)
         _rep->size = 0;         _rep->size = 0;
 } }
  


Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.2.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2