[map] Return const reference from operator()

Like we do in operator[].
This commit is contained in:
Behdad Esfahbod committed 2023-06-01 20:51:17 -06:00
1 parent b04ca1c188
commit c6368e014d
1 file changed
+1 -1
+1 -1
View File
@@ -312,7 +312,7 @@ struct hb_hashmap_t
return nullptr;
}
/* Projection. */
V operator () (K k) const { return get (k); }
const V& operator () (K k) const { return get (k); }
unsigned size () const { return mask ? mask + 1 : 0; }