| 61 |
61 |
| 62 #define cx_list_compare_wrapper(l, r, c) cx_list_compare_wrapper(l, r, (void*)c) |
62 #define cx_list_compare_wrapper(l, r, c) cx_list_compare_wrapper(l, r, (void*)c) |
| 63 |
63 |
| 64 // <editor-fold desc="empty list implementation"> |
64 // <editor-fold desc="empty list implementation"> |
| 65 |
65 |
| 66 static void cx_emptyl_noop(cx_attr_unused CxList *list) { |
66 static void cx_emptyl_noop(CX_UNUSED CxList *list) { |
| 67 // this is a noop, but MUST be implemented |
67 // this is a noop, but MUST be implemented |
| 68 } |
68 } |
| 69 |
69 |
| 70 static void *cx_emptyl_at( |
70 static void *cx_emptyl_at( |
| 71 cx_attr_unused const struct cx_list_s *list, |
71 CX_UNUSED const struct cx_list_s *list, |
| 72 cx_attr_unused size_t index |
72 CX_UNUSED size_t index |
| 73 ) { |
73 ) { |
| 74 return NULL; |
74 return NULL; |
| 75 } |
75 } |
| 76 |
76 |
| 77 static size_t cx_emptyl_find_remove( |
77 static size_t cx_emptyl_find_remove( |
| 78 cx_attr_unused struct cx_list_s *list, |
78 CX_UNUSED struct cx_list_s *list, |
| 79 cx_attr_unused const void *elem, |
79 CX_UNUSED const void *elem, |
| 80 cx_attr_unused bool remove |
80 CX_UNUSED bool remove |
| 81 ) { |
81 ) { |
| 82 return 0; |
82 return 0; |
| 83 } |
83 } |
| 84 |
84 |
| 85 static bool cx_emptyl_iter_valid(cx_attr_unused const void *iter) { |
85 static bool cx_emptyl_iter_valid(CX_UNUSED const void *iter) { |
| 86 return false; |
86 return false; |
| 87 } |
87 } |
| 88 |
88 |
| 89 static CxIterator cx_emptyl_iterator( |
89 static CxIterator cx_emptyl_iterator( |
| 90 const struct cx_list_s *list, |
90 const struct cx_list_s *list, |
| 91 size_t index, |
91 size_t index, |
| 92 cx_attr_unused bool backwards |
92 CX_UNUSED bool backwards |
| 93 ) { |
93 ) { |
| 94 CxIterator iter = {0}; |
94 CxIterator iter = {0}; |
| 95 iter.src_handle = (void*) list; |
95 iter.src_handle = (void*) list; |
| 96 iter.index = index; |
96 iter.index = index; |
| 97 iter.base.valid = cx_emptyl_iter_valid; |
97 iter.base.valid = cx_emptyl_iter_valid; |