hashmap: adjust spacing to fix argument alignment
No actual code changes; just whitespace adjustments. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
6474b86939
commit
97a39a4a93
17
hashmap.c
17
hashmap.c
@ -92,8 +92,9 @@ static void alloc_table(struct hashmap *map, unsigned int size)
|
||||
}
|
||||
|
||||
static inline int entry_equals(const struct hashmap *map,
|
||||
const struct hashmap_entry *e1, const struct hashmap_entry *e2,
|
||||
const void *keydata)
|
||||
const struct hashmap_entry *e1,
|
||||
const struct hashmap_entry *e2,
|
||||
const void *keydata)
|
||||
{
|
||||
return (e1 == e2) ||
|
||||
(e1->hash == e2->hash &&
|
||||
@ -101,7 +102,7 @@ static inline int entry_equals(const struct hashmap *map,
|
||||
}
|
||||
|
||||
static inline unsigned int bucket(const struct hashmap *map,
|
||||
const struct hashmap_entry *key)
|
||||
const struct hashmap_entry *key)
|
||||
{
|
||||
return key->hash & (map->tablesize - 1);
|
||||
}
|
||||
@ -148,7 +149,7 @@ static int always_equal(const void *unused_cmp_data,
|
||||
}
|
||||
|
||||
void hashmap_init(struct hashmap *map, hashmap_cmp_fn equals_function,
|
||||
const void *cmpfn_data, size_t initial_size)
|
||||
const void *cmpfn_data, size_t initial_size)
|
||||
{
|
||||
unsigned int size = HASHMAP_INITIAL_SIZE;
|
||||
|
||||
@ -199,7 +200,7 @@ struct hashmap_entry *hashmap_get(const struct hashmap *map,
|
||||
}
|
||||
|
||||
struct hashmap_entry *hashmap_get_next(const struct hashmap *map,
|
||||
const struct hashmap_entry *entry)
|
||||
const struct hashmap_entry *entry)
|
||||
{
|
||||
struct hashmap_entry *e = entry->next;
|
||||
for (; e; e = e->next)
|
||||
@ -225,8 +226,8 @@ void hashmap_add(struct hashmap *map, struct hashmap_entry *entry)
|
||||
}
|
||||
|
||||
struct hashmap_entry *hashmap_remove(struct hashmap *map,
|
||||
const struct hashmap_entry *key,
|
||||
const void *keydata)
|
||||
const struct hashmap_entry *key,
|
||||
const void *keydata)
|
||||
{
|
||||
struct hashmap_entry *old;
|
||||
struct hashmap_entry **e = find_entry_ptr(map, key, keydata);
|
||||
@ -249,7 +250,7 @@ struct hashmap_entry *hashmap_remove(struct hashmap *map,
|
||||
}
|
||||
|
||||
struct hashmap_entry *hashmap_put(struct hashmap *map,
|
||||
struct hashmap_entry *entry)
|
||||
struct hashmap_entry *entry)
|
||||
{
|
||||
struct hashmap_entry *old = hashmap_remove(map, entry, NULL);
|
||||
hashmap_add(map, entry);
|
||||
|
Reference in New Issue
Block a user