diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2010-05-25 05:42:26 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2010-05-25 05:42:26 +0000 |
| commit | 286dc953c1e0e4a75589e4068e29a317a03f23dd (patch) | |
| tree | 2144b0e7847222b0c6b8f6e87d8a5118e85e8b66 /src/array.h | |
| parent | a0c6e974a3393642bda80fed5bce464a6c6cf2ec (diff) | |
| download | libbu++-286dc953c1e0e4a75589e4068e29a317a03f23dd.tar.gz libbu++-286dc953c1e0e4a75589e4068e29a317a03f23dd.tar.bz2 libbu++-286dc953c1e0e4a75589e4068e29a317a03f23dd.tar.xz libbu++-286dc953c1e0e4a75589e4068e29a317a03f23dd.zip | |
More myriad tests and features, passes perfectly so far.
Diffstat (limited to 'src/array.h')
| -rw-r--r-- | src/array.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/array.h b/src/array.h index 604f8a6..39efb9e 100644 --- a/src/array.h +++ b/src/array.h | |||
| @@ -488,6 +488,18 @@ namespace Bu | |||
| 488 | core->erase( i.iPos ); | 488 | core->erase( i.iPos ); |
| 489 | } | 489 | } |
| 490 | 490 | ||
| 491 | void eraseLast() | ||
| 492 | { | ||
| 493 | _hardCopy(); | ||
| 494 | core->erase( core->iSize-1 ); | ||
| 495 | } | ||
| 496 | |||
| 497 | void eraseFirst() | ||
| 498 | { | ||
| 499 | _hardCopy(); | ||
| 500 | core->erase( 0 ); | ||
| 501 | } | ||
| 502 | |||
| 491 | /** | 503 | /** |
| 492 | * In order to make swapErase faster, what it does is swap the given | 504 | * In order to make swapErase faster, what it does is swap the given |
| 493 | * item in the array with the last item, then make the array shorter | 505 | * item in the array with the last item, then make the array shorter |
