]> rtime.felk.cvut.cz Git - ulut.git/commitdiff
uLUt: add constant modifier to key pointer for GAVL variant with repeated items allowed.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Fri, 10 Apr 2015 13:39:57 +0000 (15:39 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Fri, 10 Apr 2015 13:39:57 +0000 (15:39 +0200)
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
ulut/ul_gavlrepcust.h

index f1384705cbf9fb28b4a63fce6066ff60f36ea462..4bc9dd69b1017d8ec9af8ba3c83aab1d7d03bd40 100644 (file)
@@ -62,7 +62,7 @@ void cust_prefix##_init_root_field(cust_root_t *root)\
   root->cust_root_node=NULL;\
 }\
 \
-int cust_prefix##_search_node4(const cust_root_t *root, cust_key_t *key, gavl_node_t **nodep, int mode)\
+int cust_prefix##_search_node4(const cust_root_t *root, cust_key_t const *key, gavl_node_t **nodep, int mode)\
 {\
   int cmp=1;\
   gavl_node_t *n, *p;\
@@ -100,12 +100,12 @@ int cust_prefix##_search_node4(const cust_root_t *root, cust_key_t *key, gavl_no
   return cmp;\
 }\
 \
-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)\
 {\
   return cust_prefix##_search_node4(root, key, nodep, 0);\
 }\
 \
-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_node4(root, key, &node, 0))\
@@ -113,7 +113,7 @@ 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)\
 {\
   gavl_node_t *n;\
   if(cust_prefix##_search_node4(root, key, &n, GAVL_FFIRST))\
@@ -121,7 +121,7 @@ cust_item_t *cust_prefix##_find_first(const cust_root_t *root, cust_key_t *key)\
   return cust_prefix##_node2item(root,n);\
 }\
 \
-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_node4(root, key, &node, GAVL_FAFTER)<=0){\