Commit 76e671a6 by Patrick Steinhardt

khash: avoid using `kh_exist` directly

parent c37b069b
......@@ -127,7 +127,7 @@ static void cache_evict_entries(git_cache *cache)
while (evict_count > 0) {
khiter_t pos = seed++ % git_oidmap_end(cache->map);
if (kh_exist(cache->map, pos)) {
if (git_oidmap_has_data(cache->map, pos)) {
git_cached_obj *evict = kh_val(cache->map, pos);
evict_count--;
......
......@@ -37,6 +37,7 @@ GIT_INLINE(khint_t) git_oidmap_hash(const git_oid *oid)
#define git_oidmap_valid_index(h, idx) (idx != kh_end(h))
#define git_oidmap_exists(h, k) (kh_get(oid, h, k) != kh_end(h))
#define git_oidmap_has_data(h, idx) kh_exist(h, idx)
#define git_oidmap_value_at(h, idx) kh_val(h, idx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment