#219 improve cx_arl_iter_next

Sun, 20 Nov 2022 16:22:16 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 20 Nov 2022 16:22:16 +0100
changeset 620
f220695aded6
parent 619
5e58187ac707
child 621
646e38efc7bc

#219 improve cx_arl_iter_next

Remove one function call

src/array_list.c file | annotate | diff | comparison | revisions
--- a/src/array_list.c	Sun Nov 20 16:21:03 2022 +0100
+++ b/src/array_list.c	Sun Nov 20 16:22:16 2022 +0100
@@ -294,7 +294,9 @@
         cx_arl_remove(iter->src_handle, iter->index);
     } else {
         iter->index++;
-        iter->elem_handle = cx_arl_at(iter->src_handle, iter->index);
+        iter->elem_handle =
+                ((char *) iter->elem_handle)
+                + ((struct cx_list_s const *) iter->src_handle)->itemsize;
     }
 }
 

mercurial