diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2021-11-02 17:56:11 -0600 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2021-11-02 17:56:11 -0600 |
commit | b1cd0dce8ed2fff2b781dfb432777db7de5f3f80 (patch) | |
tree | ee7c1133edc79045d2f738a8fe7da522f436434a | |
parent | 540f19b6fe0de39312bc3f881be16e76dd902c33 (diff) | |
download | harfbuzz_ng-b1cd0dce8ed2fff2b781dfb432777db7de5f3f80.tar.gz |
[map] Add INVALID_KEY and INVALID_VALUE
-rw-r--r-- | src/hb-map.hh | 3 |
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 (); } |