Tue, 05 Oct 2021 13:04:20 +0200
remove unused cxLinkedListRecalculateSize()
It is not clear what this function was ever supposed to do.
src/cx/linked_list.h | file | annotate | diff | comparison | revisions | |
src/linked_list.c | file | annotate | diff | comparison | revisions |
1.1 --- a/src/cx/linked_list.h Tue Oct 05 13:03:45 2021 +0200 1.2 +++ b/src/cx/linked_list.h Tue Oct 05 13:04:20 2021 +0200 1.3 @@ -77,9 +77,6 @@ 1.4 */ 1.5 void cxLinkedListDestroy(CxList list); 1.6 1.7 -size_t cxLinkedListRecalculateSize(CxList list); 1.8 - 1.9 - 1.10 /** 1.11 * Finds the node at a certain index. 1.12 *
2.1 --- a/src/linked_list.c Tue Oct 05 13:03:45 2021 +0200 2.2 +++ b/src/linked_list.c Tue Oct 05 13:04:20 2021 +0200 2.3 @@ -332,24 +332,3 @@ 2.4 2.5 cxFree(list->allocator, list); 2.6 } 2.7 - 2.8 -size_t cxLinkedListRecalculateSize(CxList list) { 2.9 - cx_linked_list *ll = (cx_linked_list *) list; 2.10 - 2.11 - if (ll->begin == NULL) { 2.12 - ll->base.size = 0; 2.13 - ll->end = NULL; 2.14 - return 0; 2.15 - } else { 2.16 - cx_linked_list_node *cur = ll->begin; 2.17 - cx_linked_list_node *last; 2.18 - size_t size = 0; 2.19 - do { 2.20 - last = cur; 2.21 - size++; 2.22 - } while ((cur = cur->next) != NULL); 2.23 - ll->end = last; 2.24 - ll->base.size = size; 2.25 - return size; 2.26 - } 2.27 -}