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

Diff for /pegasus/src/Pegasus/Common/ArrayImpl.h between version 1.27 and 1.28

version 1.27, 2005/11/03 02:56:11 version 1.28, 2005/11/03 03:19:28
Line 73 
Line 73 
 #endif #endif
 Array<PEGASUS_ARRAY_T>::Array(Uint32 size) Array<PEGASUS_ARRAY_T>::Array(Uint32 size)
 { {
     Array_rep = ArrayRep<PEGASUS_ARRAY_T>::alloc(size);      _rep = ArrayRep<PEGASUS_ARRAY_T>::alloc(size);
  
     if (!_rep)     if (!_rep)
         throw NullPointer();         throw NullPointer();
Line 131 
Line 131 
     if (x._rep != Array_rep)     if (x._rep != Array_rep)
     {     {
         ArrayRep<PEGASUS_ARRAY_T>::unref(Array_rep);         ArrayRep<PEGASUS_ARRAY_T>::unref(Array_rep);
         ArrayRep<PEGASUS_ARRAY_T>::ref(Array_rep = x._rep);          _rep = x._rep;
           ArrayRep<PEGASUS_ARRAY_T>::ref(Array_rep);
     }     }
  
     return *this;     return *this;
Line 203 
Line 204 
 void Array<PEGASUS_ARRAY_T>::swap(Array<PEGASUS_ARRAY_T>& x) void Array<PEGASUS_ARRAY_T>::swap(Array<PEGASUS_ARRAY_T>& x)
 { {
     ArrayRep<PEGASUS_ARRAY_T>* tmp = Array_rep;     ArrayRep<PEGASUS_ARRAY_T>* tmp = Array_rep;
     Array_rep = x._rep;      _rep = x._rep;
     x._rep = tmp;     x._rep = tmp;
 } }
  
Line 309 
Line 310 
 void Array<PEGASUS_ARRAY_T>::remove(Uint32 index, Uint32 size) void Array<PEGASUS_ARRAY_T>::remove(Uint32 index, Uint32 size)
 { {
     if (Array_refs.get() != 1)     if (Array_refs.get() != 1)
         Array_rep = ArrayRep<PEGASUS_ARRAY_T>::copy_on_write(Array_rep);          _rep = ArrayRep<PEGASUS_ARRAY_T>::copy_on_write(Array_rep);
  
     // Case 1: attempting to remove last element (this is an optimization     // Case 1: attempting to remove last element (this is an optimization
     // for when the array is used as a stack; see Stack class).     // for when the array is used as a stack; see Stack class).
Line 360 
Line 361 
 #endif #endif
  
     if (Array_refs.get() != 1)     if (Array_refs.get() != 1)
         Array_rep = ArrayRep<PEGASUS_ARRAY_T>::copy_on_write(Array_rep);          _rep = ArrayRep<PEGASUS_ARRAY_T>::copy_on_write(Array_rep);
  
     return Array_data[index];     return Array_data[index];
 } }


Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2