提交 6f12ce47 编写于 作者: B Behdad Esfahbod

Revert "[map] Return bool from set()"

This reverts commit face7cf5.
上级 fc51c450
......@@ -118,10 +118,10 @@ struct hb_map_t
return true;
}
inline bool set (hb_codepoint_t key, hb_codepoint_t value)
inline void set (hb_codepoint_t key, hb_codepoint_t value)
{
if (unlikely (in_error)) return false;
if ((occupancy + occupancy / 2) > mask && !resize ()) return false;
if (unlikely (in_error)) return;
if ((occupancy + occupancy / 2) > mask && !resize ()) return;
unsigned int i = bucket_for (key);
if (items[i].key != key)
{
......@@ -130,7 +130,6 @@ struct hb_map_t
items[i].key = key;
}
items[i].value = value;
return true;
}
inline hb_codepoint_t get (hb_codepoint_t key) const
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册