[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); }
|
value_t operator [] (K k) const { return get (k); }
|
||||||
bool has (K k, V *vp = nullptr) const
|
bool has (K k, V *vp = nullptr) const
|
||||||
{
|
{
|
||||||
V v = (*this)[k];
|
const V &v = (*this)[k];
|
||||||
if (vp) *vp = v;
|
if (vp) *vp = v;
|
||||||
const V vinv = hb_coerce<V> (vINVALID);
|
const V vinv = hb_coerce<V> (vINVALID);
|
||||||
return v != vinv;
|
return v != vinv;
|
||||||
|
|
Loading…
Reference in New Issue