[map] Minor: use const reference in has()
This commit is contained in:
parent
24d5a11dcb
commit
b99efa6c8d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue