summaryrefslogtreecommitdiff
path: root/src/oidmap.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-01-25 14:11:42 +0100
committerPatrick Steinhardt <ps@pks.im>2017-02-17 11:41:06 +0100
commit036daa59e94bbe1a14ccd8fa018618393a0c62fb (patch)
tree3489354e8437b00f4dbe7ef1809457b53bdf25db /src/oidmap.h
parent9694d9ba794b36ebc9fc186c43464a08c2f84c4d (diff)
downloadlibgit2-036daa59e94bbe1a14ccd8fa018618393a0c62fb.tar.gz
khash: use `git_map_exists` where applicable
Diffstat (limited to 'src/oidmap.h')
-rw-r--r--src/oidmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/oidmap.h b/src/oidmap.h
index 2cf208f53..5364862d2 100644
--- a/src/oidmap.h
+++ b/src/oidmap.h
@@ -36,6 +36,8 @@ GIT_INLINE(khint_t) git_oidmap_hash(const git_oid *oid)
#define git_oidmap_lookup_index(h, k) kh_get(oid, h, k)
#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_value_at(h, idx) kh_val(h, idx)
#define git_oidmap_insert(h, key, val, rval) do { \