From 12c3e4c860e8d7d76b52dd02a9ca9af77551c2e5 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Thu, 24 Nov 2005 12:06:23 +0000 Subject: - moved remove-method to iterator --- Source/charon/utils/linked_list.h | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'Source/charon/utils/linked_list.h') diff --git a/Source/charon/utils/linked_list.h b/Source/charon/utils/linked_list.h index f5a87cd14..71fdfd45e 100644 --- a/Source/charon/utils/linked_list.h +++ b/Source/charon/utils/linked_list.h @@ -75,6 +75,19 @@ struct linked_list_iterator_t { */ status_t (*insert_after) (linked_list_iterator_t *this, void *item); + /** + * @brief removes an element from list at the given iterator position. + * + * The position of the iterator is set in the following order: + * - to the item before, if available + * - otherwise to the item after, if available + * - otherwise it gets reseted + * + * @param linked_list calling object + * @param iterator iterator holding the position of the element to remove + * @return SUCCESS if succeeded, FAILED otherwise + */ + status_t (*remove) (linked_list_iterator_t *iterator); /** * @brief Resets a linked_list_iterator object * @@ -135,20 +148,6 @@ struct linked_list_t { */ status_t (*insert_first) (linked_list_t *linked_list, void *item); - /** - * @brief removes an element from list at the given iterator position - * - * The position of the iterator is set in the following order: - * - to the item before, if available - * - otherwise to the item after, if available - * - otherwise it gets reseted - * - * @param linked_list calling object - * @param iterator iterator holding the position of the element to remove - * @return SUCCESS if succeeded, FAILED otherwise - */ - status_t (*remove) (linked_list_t *linked_list, linked_list_iterator_t *iterator); - /** * @brief removes the first item in the list and returns its value * -- cgit v1.2.3