提交 aa5af8d0 编写于 作者: G Garret Rieger 提交者: Behdad Esfahbod

Fix size calculation in DEFINE_SIZE_ARRAY_SIZED.

上级 f33ad6d6
......@@ -118,7 +118,7 @@ static inline Type& StructAfter(TObject &X)
#define DEFINE_SIZE_ARRAY_SIZED(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_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (this->array1[0]) + sizeof (this->array2[0])); \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册