mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 14:31:10 +01:00
Revert alignof() == 1 check
Bots not happy with using "this" inside assertion...
This reverts 2656644887
This commit is contained in:
1 parent
8d778877b8
commit
fb10c021c8
1 file changed
+4
-8
+4
-8
@@ -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) }
|
||||
|
||||
|
||||
Reference in new issue
Block a user