From f18f809c07ec082a3006666c7c7e20f7045c4d87 Mon Sep 17 00:00:00 2001 From: Anita Zhang Date: Fri, 4 Oct 2019 18:14:19 -0700 Subject: [PATCH] basic/set: const-ify set_first() set_steal_first() is the version that modifies Set so this one should be const. --- src/basic/set.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/basic/set.h b/src/basic/set.h index 2bb26c68b8..5f1956177e 100644 --- a/src/basic/set.h +++ b/src/basic/set.h @@ -102,8 +102,8 @@ static inline void *set_steal_first(Set *s) { /* no set_steal_first_key */ /* no set_first_key */ -static inline void *set_first(Set *s) { - return internal_hashmap_first_key_and_value(HASHMAP_BASE(s), false, NULL); +static inline void *set_first(const Set *s) { + return internal_hashmap_first_key_and_value(HASHMAP_BASE((Set *) s), false, NULL); } /* no set_next */ -- 2.25.1