From b99efa6c8dcfe7ea2c0804a77fbb6a485d38e664 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 28 May 2022 05:16:34 -0600 Subject: [PATCH] [map] Minor: use const reference in has() --- src/hb-map.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-map.hh b/src/hb-map.hh index aec7d87f4..8990bd285 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -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 (vINVALID); return v != vinv;