[map] Implement operator[] for get()ting

This commit is contained in:
Behdad Esfahbod 2018-05-29 16:37:44 -07:00
parent 743fdd9c61
commit e94be200bd
1 changed files with 3 additions and 0 deletions

View File

@ -151,6 +151,9 @@ struct hb_map_t
return get (key) != INVALID; 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; static const hb_codepoint_t INVALID = HB_MAP_VALUE_INVALID;
protected: protected: