diff options
Diffstat (limited to '')
| -rw-r--r-- | src/list.h | 22 |
1 files changed, 22 insertions, 0 deletions
| @@ -871,6 +871,28 @@ namespace Bu | |||
| 871 | return *this; | 871 | return *this; |
| 872 | } | 872 | } |
| 873 | 873 | ||
| 874 | iterator find( const value &v ) | ||
| 875 | { | ||
| 876 | for( iterator i = begin(); i; i++ ) | ||
| 877 | { | ||
| 878 | if( (*i) == v ) | ||
| 879 | return i; | ||
| 880 | } | ||
| 881 | |||
| 882 | return end(); | ||
| 883 | } | ||
| 884 | |||
| 885 | const_iterator find( const value &v ) const | ||
| 886 | { | ||
| 887 | for( const_iterator i = begin(); i; i++ ) | ||
| 888 | { | ||
| 889 | if( (*i) == v ) | ||
| 890 | return i; | ||
| 891 | } | ||
| 892 | |||
| 893 | return end(); | ||
| 894 | } | ||
| 895 | |||
| 874 | /** | 896 | /** |
| 875 | * Get the current size of the list. | 897 | * Get the current size of the list. |
| 876 | *@returns (int) The current size of the list. | 898 | *@returns (int) The current size of the list. |
