From ae080bf202e08f3b9748a2d752ee5a1cc8a522f1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 17 Nov 2022 16:34:58 -0700 Subject: [PATCH] [map] Initialize key and value explicitly If they are of int time they won't be initialized otherwise. --- src/hb-map.hh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/hb-map.hh b/src/hb-map.hh index 7ece3817d..9f6af0ea6 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -71,12 +71,10 @@ struct hb_hashmap_t uint32_t is_tombstone_ : 1; V value; - item_t () - { - hash = 0; - is_used_ = false; - is_tombstone_ = false; - } + item_t () : key (), + hash (0), + is_used_ (false), is_tombstone_ (false), + value () {} bool is_used () const { return is_used_; } void set_used (bool is_used) { is_used_ = is_used; }