diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-12-20 02:01:44 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-12-20 02:01:44 +0000 |
commit | b7a687b08e32adafbb609bec7aa79b54f161ee4c (patch) | |
tree | 9c0214eb7fa5c69619bb4226cb292d19445b92df /src/list.h | |
parent | 5db154c3fb36a677c551e39c3c6661207eb51778 (diff) | |
download | libbu++-b7a687b08e32adafbb609bec7aa79b54f161ee4c.tar.gz libbu++-b7a687b08e32adafbb609bec7aa79b54f161ee4c.tar.bz2 libbu++-b7a687b08e32adafbb609bec7aa79b54f161ee4c.tar.xz libbu++-b7a687b08e32adafbb609bec7aa79b54f161ee4c.zip |
All of the basic, core workings of the Cache are complete, and tested. Even
added some more tests and whatnot. A lot happened, but I can't remember
everything.
Also, Bu::File reports errors in more error cases.
Diffstat (limited to 'src/list.h')
-rw-r--r-- | src/list.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -532,6 +532,22 @@ namespace Bu | |||
532 | } | 532 | } |
533 | 533 | ||
534 | /** | 534 | /** |
535 | * Erase an item from the list if you already know the item. | ||
536 | *@param ob The item to find and erase. | ||
537 | */ | ||
538 | void erase( const value &v ) | ||
539 | { | ||
540 | for( iterator i = begin(); i != end(); i++ ) | ||
541 | { | ||
542 | if( (*i) == v ) | ||
543 | { | ||
544 | erase( i ); | ||
545 | return; | ||
546 | } | ||
547 | } | ||
548 | } | ||
549 | |||
550 | /** | ||
535 | * Get the current size of the list. | 551 | * Get the current size of the list. |
536 | *@returns (int) The current size of the list. | 552 | *@returns (int) The current size of the list. |
537 | */ | 553 | */ |