From b7a687b08e32adafbb609bec7aa79b54f161ee4c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sat, 20 Dec 2008 02:01:44 +0000 Subject: 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. --- src/list.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/list.h') diff --git a/src/list.h b/src/list.h index e5d7ceb..530d858 100644 --- a/src/list.h +++ b/src/list.h @@ -531,6 +531,22 @@ namespace Bu } } + /** + * Erase an item from the list if you already know the item. + *@param ob The item to find and erase. + */ + void erase( const value &v ) + { + for( iterator i = begin(); i != end(); i++ ) + { + if( (*i) == v ) + { + erase( i ); + return; + } + } + } + /** * Get the current size of the list. *@returns (int) The current size of the list. -- cgit v1.2.3