From e94be200bd7976a26ea2d6df5050d9dab4de0f08 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 29 May 2018 16:37:44 -0700 Subject: [PATCH] [map] Implement operator[] for get()ting --- src/hb-map-private.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hb-map-private.hh b/src/hb-map-private.hh index 723dde4f4..6aaf4c417 100644 --- a/src/hb-map-private.hh +++ b/src/hb-map-private.hh @@ -151,6 +151,9 @@ struct hb_map_t return get (key) != INVALID; } + inline hb_codepoint_t operator [] (unsigned int key) const + { return get (key); } + static const hb_codepoint_t INVALID = HB_MAP_VALUE_INVALID; protected: