[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Nov 22 05:22:26 UTC 2018


 src/hb-machinery.hh |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit fb10c021c8a32f8dc054f008caf86af82667e109
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Nov 22 00:21:49 2018 -0500

    Revert alignof() == 1 check
    
    Bots not happy with using "this" inside assertion...
    
    This reverts 2656644887e77a9d814bb12374af3c26b42fd935

diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh
index 2f57fb6b..f29a02aa 100644
--- a/src/hb-machinery.hh
+++ b/src/hb-machinery.hh
@@ -97,8 +97,7 @@ static inline Type& StructAfter(TObject &X)
 
 
 #define DEFINE_SIZE_STATIC(size) \
-  DEFINE_INSTANCE_ASSERTION (alignof (*this) == 1 && \
-			     sizeof (*this) == (size)); \
+  DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size)); \
   inline unsigned int get_size (void) const { return (size); } \
   enum { null_size = (size) }; \
   enum { min_size = (size) }; \
@@ -106,21 +105,18 @@ static inline Type& StructAfter(TObject &X)
 
 #define DEFINE_SIZE_UNION(size, _member) \
   DEFINE_COMPILES_ASSERTION ((void) this->u._member.static_size); \
-  DEFINE_INSTANCE_ASSERTION (alignof (*this) == 1 && \
-			     sizeof(this->u._member) == (size)); \
+  DEFINE_INSTANCE_ASSERTION (sizeof(this->u._member) == (size)); \
   enum { null_size = (size) }; \
   enum { min_size = (size) }
 
 #define DEFINE_SIZE_MIN(size) \
-  DEFINE_INSTANCE_ASSERTION (alignof (*this) == 1 && \
-			     sizeof (*this) >= (size)); \
+  DEFINE_INSTANCE_ASSERTION (sizeof (*this) >= (size)); \
   enum { null_size = (size) }; \
   enum { min_size = (size) }
 
 #define DEFINE_SIZE_ARRAY(size, array) \
   DEFINE_COMPILES_ASSERTION ((void) (array)[0].static_size); \
-  DEFINE_INSTANCE_ASSERTION (alignof (*this) == 1 && \
-			     sizeof (*this) == (size) + VAR * sizeof ((array)[0])); \
+  DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + VAR * sizeof ((array)[0])); \
   enum { null_size = (size) }; \
   enum { min_size = (size) }
 


More information about the HarfBuzz mailing list