change cxLinkedListCreate() setting all fields instead of calling cxListRecalculateSize()

Tue, 28 Sep 2021 18:09:14 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 28 Sep 2021 18:09:14 +0200
changeset 441
7d5a06e32aa8
parent 440
003aa0a78e1e
child 445
26ae21face39

change cxLinkedListCreate() setting all fields instead of calling cxListRecalculateSize()

src/linked_list.c file | annotate | diff | comparison | revisions
     1.1 --- a/src/linked_list.c	Mon Sep 27 18:57:17 2021 +0200
     1.2 +++ b/src/linked_list.c	Tue Sep 28 18:09:14 2021 +0200
     1.3 @@ -203,14 +203,14 @@
     1.4      list->base.cmpfunc = comparator;
     1.5      list->base.itemsize = item_size;
     1.6      list->base.capacity = SIZE_MAX;
     1.7 +    list->base.size = 0;
     1.8  
     1.9      list->begin = NULL;
    1.10 +    list->end = NULL;
    1.11      list->loc_prev = CX_LL_LOC_PREV;
    1.12      list->loc_next = CX_LL_LOC_NEXT;
    1.13  
    1.14 -    CxList result = (CxList) list;
    1.15 -    cxLinkedListRecalculateSize(result);
    1.16 -    return result;
    1.17 +    return (CxList) list;
    1.18  }
    1.19  
    1.20  void cxLinkedListDestroy(CxList list) {

mercurial