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

Diff for /pegasus/src/Pegasus/Common/Buffer.cpp between version 1.5 and 1.6

version 1.5, 2006/03/15 23:13:58 version 1.6, 2006/05/10 19:40:38
Line 45 
Line 45 
  
 static Uint32 _next_pow_2(Uint32 x) static Uint32 _next_pow_2(Uint32 x)
 { {
       // Check for potential overflow in x.
       PEGASUS_CHECK_CAPACITY_OVERFLOW(x);
   
     if (x < MIN_CAPACITY)     if (x < MIN_CAPACITY)
         return MIN_CAPACITY;         return MIN_CAPACITY;
  
Line 132 
Line 135 
         _rep->size = 0;         _rep->size = 0;
     }     }
     else     else
       {
           // Check for potential overflow.
           PEGASUS_CHECK_CAPACITY_OVERFLOW(_rep->cap);
         _rep = _reallocate(_rep, _rep->cap ? (2 * _rep->cap) : MIN_CAPACITY);         _rep = _reallocate(_rep, _rep->cap ? (2 * _rep->cap) : MIN_CAPACITY);
 } }
   }
  
 void Buffer::insert(size_t pos, const char* data, size_t size) void Buffer::insert(size_t pos, const char* data, size_t size)
 { {


Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2