| 31 |
31 |
| 32 #include "cx/list.h" |
32 #include "cx/list.h" |
| 33 |
33 |
| 34 // <editor-fold desc="empty map implementation"> |
34 // <editor-fold desc="empty map implementation"> |
| 35 |
35 |
| 36 static void cx_empty_map_noop(cx_attr_unused CxMap *map) { |
36 static void cx_empty_map_noop(CX_UNUSED CxMap *map) { |
| 37 // this is a noop, but MUST be implemented |
37 // this is a noop, but MUST be implemented |
| 38 } |
38 } |
| 39 |
39 |
| 40 static void *cx_empty_map_get( |
40 static void *cx_empty_map_get( |
| 41 cx_attr_unused const CxMap *map, |
41 CX_UNUSED const CxMap *map, |
| 42 cx_attr_unused CxHashKey key |
42 CX_UNUSED CxHashKey key |
| 43 ) { |
43 ) { |
| 44 return NULL; |
44 return NULL; |
| 45 } |
45 } |
| 46 |
46 |
| 47 static bool cx_empty_map_iter_valid(cx_attr_unused const void *iter) { |
47 static bool cx_empty_map_iter_valid(CX_UNUSED const void *iter) { |
| 48 return false; |
48 return false; |
| 49 } |
49 } |
| 50 |
50 |
| 51 static CxMapIterator cx_empty_map_iterator( |
51 static CxMapIterator cx_empty_map_iterator( |
| 52 const struct cx_map_s *map, |
52 const struct cx_map_s *map, |
| 53 cx_attr_unused enum cx_map_iterator_type type |
53 CX_UNUSED enum cx_map_iterator_type type |
| 54 ) { |
54 ) { |
| 55 CxMapIterator iter = {0}; |
55 CxMapIterator iter = {0}; |
| 56 iter.map = (CxMap*) map; |
56 iter.map = (CxMap*) map; |
| 57 iter.base.valid = cx_empty_map_iter_valid; |
57 iter.base.valid = cx_empty_map_iter_valid; |
| 58 return iter; |
58 return iter; |