Add some constness to str_map methods

This commit is contained in:
Přemysl Eric Janouch 2016-10-05 05:31:39 +02:00
parent 296cc704a1
commit ad143fd8c0
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 3 additions and 3 deletions

View File

@ -827,7 +827,7 @@ str_map_free (struct str_map *self)
}
static uint64_t
str_map_pos (struct str_map *self, const char *s)
str_map_pos (const struct str_map *self, const char *s)
{
size_t mask = self->alloc - 1;
return siphash_wrapper (s, strlen (s)) & mask;
@ -943,7 +943,7 @@ str_map_set (struct str_map *self, const char *key, void *value)
}
static void *
str_map_find_real (struct str_map *self, const char *key)
str_map_find_real (const struct str_map *self, const char *key)
{
struct str_map_link *iter = self->map[str_map_pos (self, key)];
for (; iter; iter = iter->next)
@ -953,7 +953,7 @@ str_map_find_real (struct str_map *self, const char *key)
}
static void *
str_map_find (struct str_map *self, const char *key)
str_map_find (const struct str_map *self, const char *key)
{
if (!self->key_xfrm)
return str_map_find_real (self, key);