]> rtime.felk.cvut.cz Git - ulut.git/blobdiff - ulut/ul_gavlcust.h
Use pointer to constant key type in GSA and GAVL custom types.
[ulut.git] / ulut / ul_gavlcust.h
index df5d3f71d040f44c653ddc80aca0c7316de60be7..2a46a6cfc2fde1b2bb9afbca4a9fe0fbfbba3b4d 100644 (file)
@@ -60,7 +60,7 @@ void cust_prefix##_init_root_field(cust_root_t *root)\
   root->cust_root_node=NULL;\
 }\
 \
-int cust_prefix##_search_node(const cust_root_t *root, cust_key_t *key, gavl_node_t **nodep)\
+int cust_prefix##_search_node(const cust_root_t *root, cust_key_t const *key, gavl_node_t **nodep)\
 {\
   int cmp=1;\
   gavl_node_t *n, *p;\
@@ -81,7 +81,7 @@ int cust_prefix##_search_node(const cust_root_t *root, cust_key_t *key, gavl_nod
   return cmp;\
 }\
 \
-cust_item_t *cust_prefix##_find(const cust_root_t *root, cust_key_t *key)\
+cust_item_t *cust_prefix##_find(const cust_root_t *root, cust_key_t const *key)\
 {\
   gavl_node_t *node;\
   if(cust_prefix##_search_node(root, key, &node))\
@@ -89,12 +89,12 @@ cust_item_t *cust_prefix##_find(const cust_root_t *root, cust_key_t *key)\
   return cust_prefix##_node2item(root,node);\
 }\
 \
-cust_item_t *cust_prefix##_find_first(const cust_root_t *root, cust_key_t *key)\
+cust_item_t *cust_prefix##_find_first(const cust_root_t *root, cust_key_t const *key)\
 {\
   return cust_prefix##_find(root, key);\
 }\
 \
-cust_item_t *cust_prefix##_find_after(const cust_root_t *root, cust_key_t *key)\
+cust_item_t *cust_prefix##_find_after(const cust_root_t *root, cust_key_t const *key)\
 {\
   gavl_node_t *node;\
   if(cust_prefix##_search_node(root, key, &node)<=0){\