aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2021-11-02 17:56:11 -0600
committerBehdad Esfahbod <behdad@behdad.org>2021-11-02 17:56:11 -0600
commitb1cd0dce8ed2fff2b781dfb432777db7de5f3f80 (patch)
treeee7c1133edc79045d2f738a8fe7da522f436434a
parent540f19b6fe0de39312bc3f881be16e76dd902c33 (diff)
downloadharfbuzz_ng-b1cd0dce8ed2fff2b781dfb432777db7de5f3f80.tar.gz
[map] Add INVALID_KEY and INVALID_VALUE
-rw-r--r--src/hb-map.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hb-map.hh b/src/hb-map.hh
index 311e612a8..bb4a0eb5d 100644
--- a/src/hb-map.hh
+++ b/src/hb-map.hh
@@ -39,6 +39,9 @@ template <typename K, typename V,
V vINVALID = hb_is_pointer (V) ? 0 : std::is_signed<V>::value ? hb_int_min (V) : (V) -1>
struct hb_hashmap_t
{
+ static constexpr K INVALID_KEY = kINVALID;
+ static constexpr V INVALID_VALUE = vINVALID;
+
hb_hashmap_t () { init (); }
~hb_hashmap_t () { fini (); }