Fix size calculation in DEFINE_SIZE_ARRAY_SIZED.

This commit is contained in:
Garret Rieger 2018-10-23 15:45:35 -07:00 committed by Behdad Esfahbod
parent f33ad6d692
commit aa5af8d041
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ static inline Type& StructAfter(TObject &X)
#define DEFINE_SIZE_ARRAY_SIZED(size, array) \ #define DEFINE_SIZE_ARRAY_SIZED(size, array) \
DEFINE_SIZE_ARRAY(size, array); \ DEFINE_SIZE_ARRAY(size, array); \
inline unsigned int get_size (void) const { return (size - array[0].min_size + array.get_size ()); } inline unsigned int get_size (void) const { return (size - array.min_size + array.get_size ()); }
#define DEFINE_SIZE_ARRAY2(size, array1, array2) \ #define DEFINE_SIZE_ARRAY2(size, array1, array2) \
DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (this->array1[0]) + sizeof (this->array2[0])); \ DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (this->array1[0]) + sizeof (this->array2[0])); \