diff options
author | Tucker Evans <tucker@tuckerevans.com> | 2020-07-08 11:18:50 -0400 |
---|---|---|
committer | Tucker Evans <tucker@tuckerevans.com> | 2020-07-08 11:18:50 -0400 |
commit | f9c6035f032b00584708efeffda40a6ceec8a383 (patch) | |
tree | bfd29b3bad843c9deb8f2cdec17311adf0d28594 /collections/map | |
parent | 78fa3e40d3c2f0d302f4779ca35352f5f68fba0b (diff) |
Fix rename map_reset_key to map_set_key
Diffstat (limited to 'collections/map')
-rw-r--r-- | collections/map/map.c | 6 | ||||
-rw-r--r-- | collections/map/map.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/collections/map/map.c b/collections/map/map.c index 62cb016..00f2225 100644 --- a/collections/map/map.c +++ b/collections/map/map.c @@ -102,7 +102,7 @@ void *key, *val; return -1; } -void* map_reset_key(root, key) +void* map_set_key(root, key) map *root; void *key; { @@ -115,10 +115,10 @@ void *key; cmp = root->cmp(root->key, key); if (cmp < 0) - return map_reset_key(root->left, key); + return map_set_key(root->left, key); if (cmp > 0) - return map_reset_key(root->right, key); + return map_set_key(root->right, key); tmp = root->key; root->key = key; diff --git a/collections/map/map.h b/collections/map/map.h index d1a0012..9de3ba1 100644 --- a/collections/map/map.h +++ b/collections/map/map.h @@ -12,9 +12,11 @@ int map_size(map*); /*data*/ int map_insert(map*, void*, void*); -void* map_reset_key(map*, void*); void* map_index(map*, void*); +void* map_set_key(map*, void*); + + /*memory*/ void map_clear(map*); void map_free(map*); |