linked-list: Remove unused replace() method
Its functionality can be replicated by calling insert_before() followed by remove_at(). Not the other way around, though, because remove_at() changes the enumerator position.
This commit is contained in:
@@ -117,16 +117,6 @@ struct linked_list_t {
|
||||
void (*insert_before)(linked_list_t *this, enumerator_t *enumerator,
|
||||
void *item);
|
||||
|
||||
/**
|
||||
* Replaces the item the enumerator currently points to with the given item.
|
||||
*
|
||||
* @param enumerator enumerator with position
|
||||
* @param item item value to replace current item with
|
||||
* @return current item or NULL if the enumerator is at an
|
||||
* invalid position
|
||||
*/
|
||||
void *(*replace)(linked_list_t *this, enumerator_t *enumerator, void *item);
|
||||
|
||||
/**
|
||||
* Remove an item from the list where the enumerator points to.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user