src/hb-map-private.hh |    7 +++----
 src/hb-map.h          |    2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 8a978790cb4dc66816c2cd7b617829f3e9d6e88e
Author: Behdad Esfahbod <beh...@behdad.org>
Date:   Tue May 29 16:45:20 2018 -0700

    [map] Minor

diff --git a/src/hb-map.h b/src/hb-map.h
index 0901e3bd..e24bfc4f 100644
--- a/src/hb-map.h
+++ b/src/hb-map.h
@@ -80,7 +80,7 @@ hb_map_allocation_successful (const hb_map_t *map);
  hb_map_is_empty (const hb_map_t *map);
 
  HB_EXTERN unsigned int
- hb_set_get_population (const hb_set_t *set);
+ hb_map_get_population (const hb_map_t *map);
 
  HB_EXTERN hb_bool_t
  hb_map_is_equal (const hb_map_t *map,
commit 6f12ce47c0ed8c2c4bb251cd6e685459af104db8
Author: Behdad Esfahbod <beh...@behdad.org>
Date:   Tue May 29 16:45:06 2018 -0700

    Revert "[map] Return bool from set()"
    
    This reverts commit face7cf55d4895ffca314c8448c0a749a26cc182.

diff --git a/src/hb-map-private.hh b/src/hb-map-private.hh
index 56377394..6aaf4c41 100644
--- a/src/hb-map-private.hh
+++ b/src/hb-map-private.hh
@@ -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
   {
commit fc51c45079feb7d77d25204c4c17a0733f1eca56
Author: Behdad Esfahbod <beh...@behdad.org>
Date:   Tue May 29 16:44:55 2018 -0700

    Revert "[map] Make hb_map_set() return bool"
    
    This reverts commit 7bf1980146cfc081b06264ac367b23ae9397adf1.

diff --git a/src/hb-map.cc b/src/hb-map.cc
index 9c7ad787..4f50828f 100644
--- a/src/hb-map.cc
+++ b/src/hb-map.cc
@@ -170,12 +170,12 @@ hb_map_allocation_successful (const hb_map_t  *map)
  *
  * Since: REPLACEME
  **/
-hb_bool_t
+void
 hb_map_set (hb_map_t       *map,
            hb_codepoint_t  key,
            hb_codepoint_t  value)
 {
-  return map->set (key, value);
+  map->set (key, value);
 }
 
 /**
diff --git a/src/hb-map.h b/src/hb-map.h
index c12fa56a..0901e3bd 100644
--- a/src/hb-map.h
+++ b/src/hb-map.h
@@ -80,14 +80,14 @@ hb_map_allocation_successful (const hb_map_t *map);
  hb_map_is_empty (const hb_map_t *map);
 
  HB_EXTERN unsigned int
- hb_map_get_population (const hb_map_t *map);
+ hb_set_get_population (const hb_set_t *set);
 
  HB_EXTERN hb_bool_t
  hb_map_is_equal (const hb_map_t *map,
                 const hb_map_t *other);
 */
 
-HB_EXTERN hb_bool_t
+HB_EXTERN void
 hb_map_set (hb_map_t       *map,
            hb_codepoint_t  key,
            hb_codepoint_t  value);
commit 7bf1980146cfc081b06264ac367b23ae9397adf1
Author: Behdad Esfahbod <beh...@behdad.org>
Date:   Tue May 29 16:42:44 2018 -0700

    [map] Make hb_map_set() return bool

diff --git a/src/hb-map.cc b/src/hb-map.cc
index 4f50828f..9c7ad787 100644
--- a/src/hb-map.cc
+++ b/src/hb-map.cc
@@ -170,12 +170,12 @@ hb_map_allocation_successful (const hb_map_t  *map)
  *
  * Since: REPLACEME
  **/
-void
+hb_bool_t
 hb_map_set (hb_map_t       *map,
            hb_codepoint_t  key,
            hb_codepoint_t  value)
 {
-  map->set (key, value);
+  return map->set (key, value);
 }
 
 /**
diff --git a/src/hb-map.h b/src/hb-map.h
index 0901e3bd..c12fa56a 100644
--- a/src/hb-map.h
+++ b/src/hb-map.h
@@ -80,14 +80,14 @@ hb_map_allocation_successful (const hb_map_t *map);
  hb_map_is_empty (const hb_map_t *map);
 
  HB_EXTERN unsigned int
- hb_set_get_population (const hb_set_t *set);
+ hb_map_get_population (const hb_map_t *map);
 
  HB_EXTERN hb_bool_t
  hb_map_is_equal (const hb_map_t *map,
                 const hb_map_t *other);
 */
 
-HB_EXTERN void
+HB_EXTERN hb_bool_t
 hb_map_set (hb_map_t       *map,
            hb_codepoint_t  key,
            hb_codepoint_t  value);
_______________________________________________
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to