diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-08-28 06:10:45 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-08-28 06:10:45 +0000 |
commit | 6e7f15f8157499796689a2bff1d110e83104ef43 (patch) | |
tree | 03c0f2949ecc811debd8b89bdfeb6f55b691c311 /src/list.h | |
parent | 02782a0ac44aa1ddd4260198ec206ade293c82ba (diff) | |
download | libbu++-6e7f15f8157499796689a2bff1d110e83104ef43.tar.gz libbu++-6e7f15f8157499796689a2bff1d110e83104ef43.tar.bz2 libbu++-6e7f15f8157499796689a2bff1d110e83104ef43.tar.xz libbu++-6e7f15f8157499796689a2bff1d110e83104ef43.zip |
Corrected the iterator in Bu::Hash, and fixed the erase function in Bu::List,
there are a couple more fine points to touch on in Bu::Hash::iterator, I should
go through and review the whole thing at this point (iterator-wise).
Diffstat (limited to '')
-rw-r--r-- | src/list.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -668,6 +668,18 @@ namespace Bu | |||
668 | } | 668 | } |
669 | 669 | ||
670 | /** | 670 | /** |
671 | * Erase an item from the list. | ||
672 | *@param i (iterator) The item to erase. | ||
673 | */ | ||
674 | MyType &erase( const_iterator i ) | ||
675 | { | ||
676 | _hardCopy(); | ||
677 | core->erase( i.pLink ); | ||
678 | |||
679 | return *this; | ||
680 | } | ||
681 | |||
682 | /** | ||
671 | * Erase an item from the list if you already know the item. | 683 | * Erase an item from the list if you already know the item. |
672 | *@param v The item to find and erase. | 684 | *@param v The item to find and erase. |
673 | */ | 685 | */ |