# HG changeset patch # User Mike Becker # Date 1766418358 -3600 # Node ID c6a0381ab9b7c4fb397f8a2dd7429c1276306f24 # Parent 68a03cf89e15464ac78599034699618338f73069 improve code in cxArrayListCreate() diff -r 68a03cf89e15 -r c6a0381ab9b7 src/array_list.c --- a/src/array_list.c Mon Dec 22 16:40:24 2025 +0100 +++ b/src/array_list.c Mon Dec 22 16:45:58 2025 +0100 @@ -1073,13 +1073,11 @@ cx_array_list *list = cxCalloc(allocator, 1, sizeof(cx_array_list)); if (list == NULL) return NULL; - cx_list_init((CxList*)list, &cx_array_list_class, - allocator, elem_size); + cx_list_init((CxList*)list, &cx_array_list_class, allocator, elem_size); list->capacity = initial_capacity; // allocate the array after the real elem_size is known - list->data = cxCalloc(allocator, initial_capacity, - list->base.collection.elem_size); + list->data = cxCalloc(allocator, initial_capacity, elem_size); if (list->data == NULL) { // LCOV_EXCL_START cxFree(allocator, list); return NULL;