Changeset 521


Ignore:
Timestamp:
Feb 20, 2003, 4:14:25 PM (18 years ago)
Author:
pooh
Message:
  • Changed semantics of non-const operator [].
File:
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/libp++/pxx_vector.ih

    r520 r521  
    9898type_t& Vector<type_t>::operator [] (size_t _index)
    9999{
    100   if (_index < length) {
    101     return data[_index];
    102   } else {
    103     throw OutOfRange();
    104   }
     100  if (_index >= length) expand(_index - length + 1);
     101  return data[_index];
    105102}
    106103
Note: See TracChangeset for help on using the changeset viewer.