Remove DEFINE_SIZE_ARRAY2

This commit is contained in:
Behdad Esfahbod 2018-11-21 23:23:49 -05:00
parent 2656644887
commit a2b6d308a4
3 changed files with 7 additions and 13 deletions

View File

@ -123,12 +123,6 @@ static inline Type& StructAfter(TObject &X)
inline unsigned int get_size (void) const { return (size - (array).min_size + (array).get_size ()); } \
DEFINE_SIZE_ARRAY(size, array)
#define DEFINE_SIZE_ARRAY2(size, array1, array2) \
DEFINE_INSTANCE_ASSERTION (alignof (*this) == 1 && \
sizeof (*this) == (size) + sizeof (this->array1[0]) + sizeof (this->array2[0])); \
DEFINE_COMPILES_ASSERTION ((void) (array1)[0].static_size; (void) (array2)[0].static_size) \
static const unsigned int min_size = (size)
/*
* Dispatch

View File

@ -802,11 +802,11 @@ struct Lookup
HBUINT16 lookupFlag; /* Lookup qualifiers */
ArrayOf<Offset16>
subTable; /* Array of SubTables */
HBUINT16 markFilteringSetX[VAR]; /* Index (base 0) into GDEF mark glyph sets
/*HBUINT16 markFilteringSetX[VAR];*//* Index (base 0) into GDEF mark glyph sets
* structure. This field is only present if bit
* UseMarkFilteringSet of lookup flags is set. */
public:
DEFINE_SIZE_ARRAY2 (6, subTable, markFilteringSetX);
DEFINE_SIZE_ARRAY (6, subTable);
};
typedef OffsetListOf<Lookup> LookupList;
@ -1568,9 +1568,9 @@ struct VarData
HBUINT16 itemCount;
HBUINT16 shortCount;
ArrayOf<HBUINT16> regionIndices;
UnsizedArrayOf<HBUINT8>bytesX;
/*UnsizedArrayOf<HBUINT8>bytesX;*/
public:
DEFINE_SIZE_ARRAY2 (6, regionIndices, bytesX);
DEFINE_SIZE_ARRAY (6, regionIndices);
};
struct VariationStore

View File

@ -61,12 +61,12 @@ struct postV2Tail
ArrayOf<HBUINT16> glyphNameIndex; /* This is not an offset, but is the
* ordinal number of the glyph in 'post'
* string tables. */
UnsizedArrayOf<HBUINT8>
namesX; /* Glyph names with length bytes [variable]
/*UnsizedArrayOf<HBUINT8>
namesX;*/ /* Glyph names with length bytes [variable]
* (a Pascal string). */
public:
DEFINE_SIZE_ARRAY2 (2, glyphNameIndex, namesX);
DEFINE_SIZE_ARRAY (2, glyphNameIndex);
};
struct post