From 890f81e2f51ef47fe39e940ae0a422dde9b25574 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 25 Dec 2013 02:38:06 +0000 Subject: Fix some const-correctness violations. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5193 a436a847-0d15-0410-975c-d299462d15a1 --- src/collections.c | 2 +- src/zix/tree.c | 6 +++--- src/zix/tree.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/collections.c b/src/collections.c index a4ac744..6a3488b 100644 --- a/src/collections.c +++ b/src/collections.c @@ -64,7 +64,7 @@ void* lilv_collection_get(const LilvCollection* collection, const LilvIter* i) { - return zix_tree_get((ZixTreeIter*)i); + return zix_tree_get((const ZixTreeIter*)i); } /* Constructors */ diff --git a/src/zix/tree.c b/src/zix/tree.c index 844adb9..9915e89 100644 --- a/src/zix/tree.c +++ b/src/zix/tree.c @@ -612,7 +612,7 @@ zix_tree_find(const ZixTree* t, const void* e, ZixTreeIter** ti) } ZIX_API void* -zix_tree_get(ZixTreeIter* ti) +zix_tree_get(const ZixTreeIter* ti) { return ti ? ti->data : NULL; } @@ -658,13 +658,13 @@ zix_tree_rend(ZixTree* t) } ZIX_API bool -zix_tree_iter_is_end(ZixTreeIter* i) +zix_tree_iter_is_end(const ZixTreeIter* i) { return !i; } ZIX_API bool -zix_tree_iter_is_rend(ZixTreeIter* i) +zix_tree_iter_is_rend(const ZixTreeIter* i) { return !i; } diff --git a/src/zix/tree.h b/src/zix/tree.h index f89d9e5..4b6e039 100644 --- a/src/zix/tree.h +++ b/src/zix/tree.h @@ -86,7 +86,7 @@ zix_tree_find(const ZixTree* t, const void* e, ZixTreeIter** ti); Return the data associated with the given tree item. */ ZIX_API void* -zix_tree_get(ZixTreeIter* ti); +zix_tree_get(const ZixTreeIter* ti); /** Return an iterator to the first (smallest) element in @a t. @@ -104,7 +104,7 @@ zix_tree_end(ZixTree* t); Return true iff @a i is an iterator to the end of its tree. */ ZIX_API bool -zix_tree_iter_is_end(ZixTreeIter* i); +zix_tree_iter_is_end(const ZixTreeIter* i); /** Return an iterator to the last (largest) element in @a t. @@ -122,7 +122,7 @@ zix_tree_rend(ZixTree* t); Return true iff @a i is an iterator to the reverse end of its tree. */ ZIX_API bool -zix_tree_iter_is_rend(ZixTreeIter* i); +zix_tree_iter_is_rend(const ZixTreeIter* i); /** Return an iterator that points to the element one past @a i. -- cgit v1.2.1