Revert "[map] Return bool from set()"
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 29 May 2018 23:45:06 +0000 (16:45 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 29 May 2018 23:45:06 +0000 (16:45 -0700)
This reverts commit face7cf55d4895ffca314c8448c0a749a26cc182.

src/hb-map-private.hh

index 5637739..6aaf4c4 100644 (file)
@@ -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
   {