This method only assigns "pos" if the element is found. Maybe we should modify it to iterate directy with "pos".
| 431 | // This method only assigns "pos" if the element is found. |
| 432 | // Maybe we should modify it to iterate directy with "pos". |
| 433 | bool find(const T& item, size_type& pos) const |
| 434 | { |
| 435 | for (size_type i = 0; i < count; i++) |
| 436 | { |
| 437 | if (data[i] == item) |
| 438 | { |
| 439 | pos = i; |
| 440 | return true; |
| 441 | } |
| 442 | } |
| 443 | return false; |
| 444 | } |
| 445 | |
| 446 | bool findAndRemove(const T& item) |
| 447 | { |
no outgoing calls