diff options
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 | */ |
