From be75f4de44ddce9b990bde83d52307ac092a9d78 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Fri, 10 Apr 2015 15:39:57 +0200 Subject: [PATCH] uLUt: add constant modifier to key pointer for GAVL variant with repeated items allowed. Signed-off-by: Pavel Pisa --- ulut/ul_gavlrepcust.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ulut/ul_gavlrepcust.h b/ulut/ul_gavlrepcust.h index f138470..4bc9dd6 100644 --- a/ulut/ul_gavlrepcust.h +++ b/ulut/ul_gavlrepcust.h @@ -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){\ -- 2.39.2