[map] Minor: use const reference in has()

This commit is contained in:
Behdad Esfahbod 2022-05-28 05:16:34 -06:00
parent 24d5a11dcb
commit b99efa6c8d
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ struct hb_hashmap_t
value_t operator [] (K k) const { return get (k); }
bool has (K k, V *vp = nullptr) const
{
V v = (*this)[k];
const V &v = (*this)[k];
if (vp) *vp = v;
const V vinv = hb_coerce<V> (vINVALID);
return v != vinv;