diff --git a/src/hb-map.hh b/src/hb-map.hh index e89c3e9eb..2ddb45565 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -258,7 +258,11 @@ struct hb_hashmap_t template bool set (const K &key, VV&& value, bool overwrite = true) { return set_with_hash (key, hb_hash (key), std::forward (value), overwrite); } template - bool set (K &&key, VV&& value, bool overwrite = true) { return set_with_hash (std::move (key), hb_hash (key), std::forward (value), overwrite); } + bool set (K &&key, VV&& value, bool overwrite = true) + { + uint32_t hash = hb_hash (key); + return set_with_hash (std::move (key), hash, std::forward (value), overwrite); + } const V& get_with_hash (const K &key, uint32_t hash) const {