mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 14:02:57 +00:00
khash: avoid using kh_exist
directly
This commit is contained in:
parent
c37b069b9f
commit
76e671a653
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user