version 1.32, 2006/05/10 19:40:38
|
version 1.33, 2006/08/09 20:03:27
|
|
|
PEGASUS_ARRAY_T& Array<PEGASUS_ARRAY_T>::operator[]( | PEGASUS_ARRAY_T& Array<PEGASUS_ARRAY_T>::operator[]( |
Uint32 index) | Uint32 index) |
{ | { |
#ifndef PEGASUS_ARRAY_NO_THROW |
|
if (index >= Array_size) | if (index >= Array_size) |
ArrayThrowIndexOutOfBoundsException(); | ArrayThrowIndexOutOfBoundsException(); |
#endif |
|
| |
if (Array_refs.get() != 1) | if (Array_refs.get() != 1) |
_rep = ArrayRep<PEGASUS_ARRAY_T>::copy_on_write(Array_rep); | _rep = ArrayRep<PEGASUS_ARRAY_T>::copy_on_write(Array_rep); |
|
|
const PEGASUS_ARRAY_T& Array<PEGASUS_ARRAY_T>::operator[]( | const PEGASUS_ARRAY_T& Array<PEGASUS_ARRAY_T>::operator[]( |
Uint32 index) const | Uint32 index) const |
{ | { |
#ifndef PEGASUS_ARRAY_NO_THROW |
|
if (index >= Array_size) | if (index >= Array_size) |
ArrayThrowIndexOutOfBoundsException(); | ArrayThrowIndexOutOfBoundsException(); |
#endif |
|
| |
return Array_data[index]; | return Array_data[index]; |
} | } |