[HarfBuzz] harfbuzz: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Aug 9 07:57:21 UTC 2018


 src/hb-atomic-private.hh |    2 --
 src/hb-iter-private.hh   |    2 +-
 src/hb-object-private.hh |    7 +++++--
 3 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit aa3b6017ed71fc251522ff1bedcdae965b4c1c1c
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Aug 9 00:56:28 2018 -0700

    Revert "[iter] Make operator bool explicit"
    
    This reverts commit 66920a6bace7c54c8166c4ed938b6ffc5fabcf2b.
    
    Some of our bots (Oracle Studio and Apple gcc 4.2) do not allow
    explicit except for constructors.
    
    https://github.com/harfbuzz/harfbuzz/issues/1127

diff --git a/src/hb-iter-private.hh b/src/hb-iter-private.hh
index 039a7734..410a50f9 100644
--- a/src/hb-iter-private.hh
+++ b/src/hb-iter-private.hh
@@ -72,7 +72,7 @@ struct Iter<T *>
     array (array_), length (length_) {}
 
   /* Emptiness. */
-  explicit inline operator bool (void) const { return bool (length); }
+  inline operator bool (void) const { return bool (length); }
 
   /* Current item. */
   inline T &operator * (void)
commit e1a2354220c369bd5a62d255acc42c60cd14c473
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Aug 9 00:53:25 2018 -0700

    [atomic] More

diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh
index 276e696b..297c6469 100644
--- a/src/hb-atomic-private.hh
+++ b/src/hb-atomic-private.hh
@@ -274,8 +274,6 @@ struct hb_atomic_ptr_t
   inline T *get (void) const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); }
   inline bool cmpexch (const T *old, T *new_) const{ return hb_atomic_ptr_impl_cmpexch (&v, old, new_); }
 
-  inline T* operator -> (void) const { return get (); }
-
   mutable T *v;
 };
 
diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh
index f5d78e55..4955a68d 100644
--- a/src/hb-object-private.hh
+++ b/src/hb-object-private.hh
@@ -312,10 +312,13 @@ template <typename Type>
 static inline void *hb_object_get_user_data (Type               *obj,
 					     hb_user_data_key_t *key)
 {
-  if (unlikely (!obj || hb_object_is_inert (obj) || !obj->header.user_data.get ()))
+  if (unlikely (!obj || hb_object_is_inert (obj)))
     return nullptr;
   assert (hb_object_is_valid (obj));
-  return obj->header.user_data->get (key);
+  hb_user_data_array_t *user_data = obj->header.user_data.get ();
+  if (!user_data)
+    return nullptr;
+  return user_data->get (key);
 }
 
 


More information about the HarfBuzz mailing list