Revert alignof() == 1 check
Bots not happy with using "this" inside assertion...
This reverts 2656644887
This commit is contained in:
parent
8d778877b8
commit
fb10c021c8
|
@ -97,8 +97,7 @@ static inline Type& StructAfter(TObject &X)
|
||||||
|
|
||||||
|
|
||||||
#define DEFINE_SIZE_STATIC(size) \
|
#define DEFINE_SIZE_STATIC(size) \
|
||||||
DEFINE_INSTANCE_ASSERTION (alignof (*this) == 1 && \
|
DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size)); \
|
||||||
sizeof (*this) == (size)); \
|
|
||||||
inline unsigned int get_size (void) const { return (size); } \
|
inline unsigned int get_size (void) const { return (size); } \
|
||||||
enum { null_size = (size) }; \
|
enum { null_size = (size) }; \
|
||||||
enum { min_size = (size) }; \
|
enum { min_size = (size) }; \
|
||||||
|
@ -106,21 +105,18 @@ static inline Type& StructAfter(TObject &X)
|
||||||
|
|
||||||
#define DEFINE_SIZE_UNION(size, _member) \
|
#define DEFINE_SIZE_UNION(size, _member) \
|
||||||
DEFINE_COMPILES_ASSERTION ((void) this->u._member.static_size); \
|
DEFINE_COMPILES_ASSERTION ((void) this->u._member.static_size); \
|
||||||
DEFINE_INSTANCE_ASSERTION (alignof (*this) == 1 && \
|
DEFINE_INSTANCE_ASSERTION (sizeof(this->u._member) == (size)); \
|
||||||
sizeof(this->u._member) == (size)); \
|
|
||||||
enum { null_size = (size) }; \
|
enum { null_size = (size) }; \
|
||||||
enum { min_size = (size) }
|
enum { min_size = (size) }
|
||||||
|
|
||||||
#define DEFINE_SIZE_MIN(size) \
|
#define DEFINE_SIZE_MIN(size) \
|
||||||
DEFINE_INSTANCE_ASSERTION (alignof (*this) == 1 && \
|
DEFINE_INSTANCE_ASSERTION (sizeof (*this) >= (size)); \
|
||||||
sizeof (*this) >= (size)); \
|
|
||||||
enum { null_size = (size) }; \
|
enum { null_size = (size) }; \
|
||||||
enum { min_size = (size) }
|
enum { min_size = (size) }
|
||||||
|
|
||||||
#define DEFINE_SIZE_ARRAY(size, array) \
|
#define DEFINE_SIZE_ARRAY(size, array) \
|
||||||
DEFINE_COMPILES_ASSERTION ((void) (array)[0].static_size); \
|
DEFINE_COMPILES_ASSERTION ((void) (array)[0].static_size); \
|
||||||
DEFINE_INSTANCE_ASSERTION (alignof (*this) == 1 && \
|
DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + VAR * sizeof ((array)[0])); \
|
||||||
sizeof (*this) == (size) + VAR * sizeof ((array)[0])); \
|
|
||||||
enum { null_size = (size) }; \
|
enum { null_size = (size) }; \
|
||||||
enum { min_size = (size) }
|
enum { min_size = (size) }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue