From 0e294c455e7f2e50172f65463ab016f1372d4c59 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 6 Sep 2019 16:54:27 -0400 Subject: [PATCH] Rename VAR to HB_VAR_ARRAY --- src/hb-machinery.hh | 2 +- src/hb-open-type.hh | 8 ++++---- src/hb-ot-cff-common.hh | 6 +++--- src/hb-ot-cff1-table.hh | 4 ++-- src/hb-ot-layout-common.hh | 2 +- src/hb-ot-maxp-table.hh | 2 +- src/hb-string-array.hh | 2 +- src/hb.hh | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh index 383c469ef..15535d75b 100644 --- a/src/hb-machinery.hh +++ b/src/hb-machinery.hh @@ -135,7 +135,7 @@ static inline Type& StructAfter(TObject &X) #define DEFINE_SIZE_ARRAY(size, array) \ DEFINE_COMPILES_ASSERTION ((void) (array)[0].static_size) \ - DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + VAR * sizeof ((array)[0])) \ + DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + HB_VAR_ARRAY * sizeof ((array)[0])) \ static constexpr unsigned null_size = (size); \ static constexpr unsigned min_size = (size) diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index 94ee04b87..7f10fc5a4 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -483,7 +483,7 @@ struct UnsizedArrayOf } public: - Type arrayZ[VAR]; + Type arrayZ[HB_VAR_ARRAY]; public: DEFINE_SIZE_UNBOUNDED (0); }; @@ -669,7 +669,7 @@ struct ArrayOf public: LenType len; - Type arrayZ[VAR]; + Type arrayZ[HB_VAR_ARRAY]; public: DEFINE_SIZE_ARRAY (sizeof (LenType), arrayZ); }; @@ -802,7 +802,7 @@ struct HeadlessArrayOf public: LenType lenP1; - Type arrayZ[VAR]; + Type arrayZ[HB_VAR_ARRAY]; public: DEFINE_SIZE_ARRAY (sizeof (LenType), arrayZ); }; @@ -850,7 +850,7 @@ struct ArrayOfM1 public: LenType lenM1; - Type arrayZ[VAR]; + Type arrayZ[HB_VAR_ARRAY]; public: DEFINE_SIZE_ARRAY (sizeof (LenType), arrayZ); }; diff --git a/src/hb-ot-cff-common.hh b/src/hb-ot-cff-common.hh index 0feda907f..f4c4fe857 100644 --- a/src/hb-ot-cff-common.hh +++ b/src/hb-ot-cff-common.hh @@ -237,8 +237,8 @@ struct CFFIndex public: COUNT count; /* Number of object data. Note there are (count+1) offsets */ HBUINT8 offSize; /* The byte size of each offset in the offsets array. */ - HBUINT8 offsets[VAR]; /* The array of (count + 1) offsets into objects array (1-base). */ - /* HBUINT8 data[VAR]; Object data */ + HBUINT8 offsets[HB_VAR_ARRAY]; /* The array of (count + 1) offsets into objects array (1-base). */ + /* HBUINT8 data[HB_VAR_ARRAY]; Object data */ public: DEFINE_SIZE_ARRAY (COUNT::static_size + HBUINT8::static_size, offsets); }; @@ -514,7 +514,7 @@ struct FDSelect0 { unsigned int get_size (unsigned int num_glyphs) const { return HBUINT8::static_size * num_glyphs; } - HBUINT8 fds[VAR]; + HBUINT8 fds[HB_VAR_ARRAY]; DEFINE_SIZE_MIN (0); }; diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh index 4050b7d6f..882250f26 100644 --- a/src/hb-ot-cff1-table.hh +++ b/src/hb-ot-cff1-table.hh @@ -357,7 +357,7 @@ struct Charset0 { return HBUINT16::static_size * (num_glyphs - 1); } - HBUINT16 sids[VAR]; + HBUINT16 sids[HB_VAR_ARRAY]; DEFINE_SIZE_ARRAY(0, sids); }; @@ -439,7 +439,7 @@ struct Charset1_2 { return size; } - Charset_Range ranges[VAR]; + Charset_Range ranges[HB_VAR_ARRAY]; DEFINE_SIZE_ARRAY (0, ranges); }; diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 5158f0a5c..388b31634 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -780,7 +780,7 @@ struct Lookup HBUINT16 lookupFlag; /* Lookup qualifiers */ ArrayOf subTable; /* Array of SubTables */ -/*HBUINT16 markFilteringSetX[VAR];*//* Index (base 0) into GDEF mark glyph sets +/*HBUINT16 markFilteringSetX[HB_VAR_ARRAY];*//* Index (base 0) into GDEF mark glyph sets * structure. This field is only present if bit * UseMarkFilteringSet of lookup flags is set. */ public: diff --git a/src/hb-ot-maxp-table.hh b/src/hb-ot-maxp-table.hh index 9945ea68f..1c25eda16 100644 --- a/src/hb-ot-maxp-table.hh +++ b/src/hb-ot-maxp-table.hh @@ -129,7 +129,7 @@ struct maxp FixedVersion<>version; /* Version of the maxp table (0.5 or 1.0), * 0x00005000u or 0x00010000u. */ HBUINT16 numGlyphs; /* The number of glyphs in the font. */ -/*maxpV1Tail v1Tail[VAR]; */ +/*maxpV1Tail v1Tail[HB_VAR_ARRAY]; */ public: DEFINE_SIZE_STATIC (6); }; diff --git a/src/hb-string-array.hh b/src/hb-string-array.hh index c4cf666d7..1c67ab4d7 100644 --- a/src/hb-string-array.hh +++ b/src/hb-string-array.hh @@ -48,7 +48,7 @@ static const union HB_STRING_ARRAY_TYPE_NAME { #include HB_STRING_ARRAY_LIST #undef _S } st; - char str[VAR]; + char str[HB_VAR_ARRAY]; } HB_STRING_ARRAY_POOL_NAME = { diff --git a/src/hb.hh b/src/hb.hh index f0942870f..778cb6992 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -475,7 +475,7 @@ static_assert ((sizeof (hb_var_int_t) == 4), ""); /* Size signifying variable-sized array */ -#define VAR 1 +#define HB_VAR_ARRAY 1 static inline double _hb_roundf (float x)