inline const Type& operator [] (unsigned int i) const
{
if (unlikely (i >= header.nUnits)) return Null(Type);
- return StructAtOffset<Type> (bytes, i * header.unitSize);
+ return StructAtOffset<Type> (bytesZ, i * header.unitSize);
}
inline Type& operator [] (unsigned int i)
{
- return StructAtOffset<Type> (bytes, i * header.unitSize);
+ return StructAtOffset<Type> (bytesZ, i * header.unitSize);
}
inline unsigned int get_size (void) const
{ return header.static_size + header.nUnits * header.unitSize; }
* pointed to do have a simple sanitize(), ie. they do not
* reference other structs via offsets.
*/
- (void) (false && StructAtOffset<Type> (bytes, 0).sanitize (c));
+ (void) (false && StructAtOffset<Type> (bytesZ, 0).sanitize (c));
return_trace (true);
}
while (min <= max)
{
int mid = (min + max) / 2;
- const Type *p = (const Type *) (((const char *) bytes) + (mid * size));
+ const Type *p = (const Type *) (((const char *) bytesZ) + (mid * size));
int c = p->cmp (key);
if (c < 0)
max = mid - 1;
TRACE_SANITIZE (this);
return_trace (header.sanitize (c) &&
Type::static_size >= header.unitSize &&
- c->check_array (bytes, header.unitSize, header.nUnits));
+ c->check_array (bytesZ, header.unitSize, header.nUnits));
}
protected:
BinSearchHeader header;
- HBUINT8 bytes[VAR];
+ HBUINT8 bytesZ[VAR];
public:
- DEFINE_SIZE_ARRAY (10, bytes);
+ DEFINE_SIZE_ARRAY (10, bytesZ);
};
HBUINT16 version;
HBUINT16 padding;
HBUINT32 nTables;
-/*KerxTable tables[VAR];*/
+/*KerxTable tablesZ[VAR]; XXX ArrayOf??? */
/*SubtableGlyphCoverageArray coverage_array;*/
public:
DEFINE_SIZE_STATIC (8);
inline void apply (hb_aat_apply_context_t *c) const
{
c->set_lookup_index (0);
- const Chain *chain = chains;
+ const Chain *chain = chainsZ;
unsigned int count = chainCount;
for (unsigned int i = 0; i < count; i++)
{
!chainCount.sanitize (c))
return_trace (false);
- const Chain *chain = chains;
+ const Chain *chain = chainsZ;
unsigned int count = chainCount;
for (unsigned int i = 0; i < count; i++)
{
* 1 for mort, 2 or 3 for morx. */
HBUINT32 chainCount; /* Number of metamorphosis chains contained in this
* table. */
- Chain chains[VAR]; /* Chains. */
+ Chain chainsZ[VAR]; /* Chains. */
public:
DEFINE_SIZE_MIN (8);
else
*table_count = MIN<unsigned int> (*table_count, tables.len - start_offset);
- const TableRecord *sub_tables = tables.array + start_offset;
+ const TableRecord *sub_tables = tables.arrayZ + start_offset;
unsigned int count = *table_count;
for (unsigned int i = 0; i < count; i++)
table_tags[i] = sub_tables[i].tag;
/* Write OffsetTables, alloc for and write actual table blobs. */
for (unsigned int i = 0; i < table_count; i++)
{
- TableRecord &rec = tables.array[i];
+ TableRecord &rec = tables.arrayZ[i];
hb_blob_t *blob = blobs[i];
rec.tag.set (tags[i]);
rec.length.set (hb_blob_get_length (blob));
checksum.set_for_data (this, dir_end - (const char *) this);
for (unsigned int i = 0; i < table_count; i++)
{
- TableRecord &rec = tables.array[i];
+ TableRecord &rec = tables.arrayZ[i];
checksum.set (checksum + rec.checkSum);
}
count -= start_offset;
count = MIN (count, *pcount);
*pcount = count;
- return array + start_offset;
+ return arrayZ + start_offset;
}
inline const Type& operator [] (unsigned int i) const
{
if (unlikely (i >= len)) return Null(Type);
- return array[i];
+ return arrayZ[i];
}
inline Type& operator [] (unsigned int i)
{
- return array[i];
+ return arrayZ[i];
}
inline unsigned int get_size (void) const
{ return len.static_size + len * Type::static_size; }
TRACE_SERIALIZE (this);
if (unlikely (!serialize (c, items_len))) return_trace (false);
for (unsigned int i = 0; i < items_len; i++)
- array[i] = items[i];
+ arrayZ[i] = items[i];
items += items_len;
return_trace (true);
}
* pointed to do have a simple sanitize(), ie. they do not
* reference other structs via offsets.
*/
- (void) (false && array[0].sanitize (c));
+ (void) (false && arrayZ[0].sanitize (c));
return_trace (true);
}
if (unlikely (!sanitize_shallow (c))) return_trace (false);
unsigned int count = len;
for (unsigned int i = 0; i < count; i++)
- if (unlikely (!array[i].sanitize (c, base)))
+ if (unlikely (!arrayZ[i].sanitize (c, base)))
return_trace (false);
return_trace (true);
}
if (unlikely (!sanitize_shallow (c))) return_trace (false);
unsigned int count = len;
for (unsigned int i = 0; i < count; i++)
- if (unlikely (!array[i].sanitize (c, base, user_data)))
+ if (unlikely (!arrayZ[i].sanitize (c, base, user_data)))
return_trace (false);
return_trace (true);
}
{
unsigned int count = len;
for (unsigned int i = 0; i < count; i++)
- if (!this->array[i].cmp (x))
+ if (!this->arrayZ[i].cmp (x))
return i;
return -1;
}
inline void qsort (void)
{
- ::qsort (array, len, sizeof (Type), Type::cmp);
+ ::qsort (arrayZ, len, sizeof (Type), Type::cmp);
}
private:
inline bool sanitize_shallow (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (len.sanitize (c) && c->check_array (array, Type::static_size, len));
+ return_trace (len.sanitize (c) && c->check_array (arrayZ, Type::static_size, len));
}
public:
LenType len;
- Type array[VAR];
+ Type arrayZ[VAR];
public:
- DEFINE_SIZE_ARRAY (sizeof (LenType), array);
+ DEFINE_SIZE_ARRAY (sizeof (LenType), arrayZ);
};
template <typename Type> struct LArrayOf : ArrayOf<Type, HBUINT32> {};
inline const Type& operator [] (unsigned int i) const
{
if (unlikely (i >= this->len)) return Null(Type);
- return this+this->array[i];
+ return this+this->arrayZ[i];
}
inline bool sanitize (hb_sanitize_context_t *c) const
inline const Type& operator [] (unsigned int i) const
{
if (unlikely (i >= len || !i)) return Null(Type);
- return array[i-1];
+ return arrayZ[i-1];
}
inline unsigned int get_size (void) const
{ return len.static_size + (len ? len - 1 : 0) * Type::static_size; }
if (unlikely (!items_len)) return_trace (true);
if (unlikely (!c->extend (*this))) return_trace (false);
for (unsigned int i = 0; i < items_len - 1; i++)
- array[i] = items[i];
+ arrayZ[i] = items[i];
items += items_len - 1;
return_trace (true);
}
* pointed to do have a simple sanitize(), ie. they do not
* reference other structs via offsets.
*/
- (void) (false && array[0].sanitize (c));
+ (void) (false && arrayZ[0].sanitize (c));
return_trace (true);
}
{
TRACE_SANITIZE (this);
return_trace (len.sanitize (c) &&
- (!len || c->check_array (array, Type::static_size, len - 1)));
+ (!len || c->check_array (arrayZ, Type::static_size, len - 1)));
}
public:
LenType len;
- Type array[VAR];
+ Type arrayZ[VAR];
public:
- DEFINE_SIZE_ARRAY (sizeof (LenType), array);
+ DEFINE_SIZE_ARRAY (sizeof (LenType), arrayZ);
};
inline int bsearch (const SearchType &x) const
{
/* Hand-coded bsearch here since this is in the hot inner loop. */
- const Type *arr = this->array;
+ const Type *arr = this->arrayZ;
int min = 0, max = (int) this->len - 1;
while (min <= max)
{
{
TRACE_SERIALIZE (this);
if (unlikely (!c->extend_min (*this))) return_trace (false);
- Supplier<CmapSubtableLongGroup> supplier (group_data.array, group_data.len);
+ Supplier<CmapSubtableLongGroup> supplier (group_data.arrayZ, group_data.len);
if (unlikely (!groups.serialize (c, supplier, group_data.len))) return_trace (false);
return true;
}
unsigned int count = sizeTables.len;
for (uint32_t i = 0; i < count; ++i)
{
- unsigned int startGlyphIndex = sizeTables.array[i].startGlyphIndex;
- unsigned int endGlyphIndex = sizeTables.array[i].endGlyphIndex;
+ unsigned int startGlyphIndex = sizeTables.arrayZ[i].startGlyphIndex;
+ unsigned int endGlyphIndex = sizeTables.arrayZ[i].endGlyphIndex;
if (startGlyphIndex <= glyph && glyph <= endGlyphIndex)
{
*x_ppem = sizeTables[i].ppemX;
case 17: {
const GlyphBitmapDataFormat17& glyphFormat17 =
StructAtOffset<GlyphBitmapDataFormat17> (this->cbdt, image_offset);
- callback ((const uint8_t *) &glyphFormat17.data.array,
+ callback ((const uint8_t *) &glyphFormat17.data.arrayZ,
glyphFormat17.data.len, i, gid);
}
break;
case 18: {
const GlyphBitmapDataFormat18& glyphFormat18 =
StructAtOffset<GlyphBitmapDataFormat18> (this->cbdt, image_offset);
- callback ((const uint8_t *) &glyphFormat18.data.array,
+ callback ((const uint8_t *) &glyphFormat18.data.arrayZ,
glyphFormat18.data.len, i, gid);
}
break;
case 19: {
const GlyphBitmapDataFormat19& glyphFormat19 =
StructAtOffset<GlyphBitmapDataFormat19> (this->cbdt, image_offset);
- callback ((const uint8_t *) &glyphFormat19.data.array,
+ callback ((const uint8_t *) &glyphFormat19.data.arrayZ,
glyphFormat19.data.len, i, gid);
}
break;
template <typename set_t>
inline bool add_coverage (set_t *glyphs) const {
- return glyphs->add_sorted_array (glyphArray.array, glyphArray.len);
+ return glyphs->add_sorted_array (glyphArray.arrayZ, glyphArray.len);
}
public:
const HBINT16 *scursor = reinterpret_cast<const HBINT16 *> (row);
for (; i < scount; i++)
{
- float scalar = regions.evaluate (regionIndices.array[i], coords, coord_count);
+ float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count);
delta += scalar * *scursor++;
}
const HBINT8 *bcursor = reinterpret_cast<const HBINT8 *> (scursor);
for (; i < count; i++)
{
- float scalar = regions.evaluate (regionIndices.array[i], coords, coord_count);
+ float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count);
delta += scalar * *bcursor++;
}
{
unsigned int count = conditions.len;
for (unsigned int i = 0; i < count; i++)
- if (!(this+conditions.array[i]).evaluate (coords, coord_len))
+ if (!(this+conditions.arrayZ[i]).evaluate (coords, coord_len))
return false;
return true;
}
unsigned int count = substitutions.len;
for (unsigned int i = 0; i < count; i++)
{
- const FeatureTableSubstitutionRecord &record = substitutions.array[i];
+ const FeatureTableSubstitutionRecord &record = substitutions.arrayZ[i];
if (record.featureIndex == feature_index)
return &(this+record.feature);
}
unsigned int count = varRecords.len;
for (unsigned int i = 0; i < count; i++)
{
- const FeatureVariationRecord &record = varRecords.array[i];
+ const FeatureVariationRecord &record = varRecords.arrayZ[i];
if ((this+record.conditions).evaluate (coords, coord_len))
{
*index = i;
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
- c->output->add_array (substitute.array, substitute.len);
+ c->output->add_array (substitute.arrayZ, substitute.len);
}
inline bool apply (hb_ot_apply_context_t *c) const
* as a "multiplied" substitution. */
if (unlikely (count == 1))
{
- c->replace_glyph (substitute.array[0]);
+ c->replace_glyph (substitute.arrayZ[0]);
return_trace (true);
}
/* Spec disallows this, but Uniscribe allows it.
for (unsigned int i = 0; i < count; i++) {
_hb_glyph_info_set_lig_props_for_component (&c->buffer->cur(), i);
- c->output_glyph_for_component (substitute.array[i], klass);
+ c->output_glyph_for_component (substitute.arrayZ[i], klass);
}
c->buffer->skip_glyph ();
if (unlikely (iter.get_coverage () >= count))
break; /* Work around malicious fonts. https://github.com/harfbuzz/harfbuzz/issues/363 */
const AlternateSet &alt_set = this+alternateSet[iter.get_coverage ()];
- c->output->add_array (alt_set.array, alt_set.len);
+ c->output->add_array (alt_set.arrayZ, alt_set.len);
}
}
inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
TRACE_COLLECT_GLYPHS (this);
- c->input->add_array (component.array, component.len ? component.len - 1 : 0);
+ c->input->add_array (component.arrayZ, component.len ? component.len - 1 : 0);
c->output->add (ligGlyph);
}
const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
count = substitute.len;
- c->output->add_array (substitute.array, substitute.len);
+ c->output->add_array (substitute.arrayZ, substitute.len);
}
inline const Coverage &get_coverage (void) const
unsigned int start_index = 0, end_index = 0;
if (match_backtrack (c,
- backtrack.len, (HBUINT16 *) backtrack.array,
+ backtrack.len, (HBUINT16 *) backtrack.arrayZ,
match_coverage, this,
&start_index) &&
match_lookahead (c,
- lookahead.len, (HBUINT16 *) lookahead.array,
+ lookahead.len, (HBUINT16 *) lookahead.arrayZ,
match_coverage, this,
1, &end_index))
{
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16> > (input);
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
chain_context_closure_lookup (c,
- backtrack.len, backtrack.array,
- input.len, input.array,
- lookahead.len, lookahead.array,
- lookup.len, lookup.array,
+ backtrack.len, backtrack.arrayZ,
+ input.len, input.arrayZ,
+ lookahead.len, lookahead.arrayZ,
+ lookup.len, lookup.arrayZ,
lookup_context);
}
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16> > (input);
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
chain_context_collect_glyphs_lookup (c,
- backtrack.len, backtrack.array,
- input.len, input.array,
- lookahead.len, lookahead.array,
- lookup.len, lookup.array,
+ backtrack.len, backtrack.arrayZ,
+ input.len, input.arrayZ,
+ lookahead.len, lookahead.arrayZ,
+ lookup.len, lookup.arrayZ,
lookup_context);
}
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16> > (input);
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
return_trace (chain_context_would_apply_lookup (c,
- backtrack.len, backtrack.array,
- input.len, input.array,
- lookahead.len, lookahead.array, lookup.len,
- lookup.array, lookup_context));
+ backtrack.len, backtrack.arrayZ,
+ input.len, input.arrayZ,
+ lookahead.len, lookahead.arrayZ, lookup.len,
+ lookup.arrayZ, lookup_context));
}
inline bool apply (hb_ot_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16> > (input);
const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
return_trace (chain_context_apply_lookup (c,
- backtrack.len, backtrack.array,
- input.len, input.array,
- lookahead.len, lookahead.array, lookup.len,
- lookup.array, lookup_context));
+ backtrack.len, backtrack.arrayZ,
+ input.len, input.arrayZ,
+ lookahead.len, lookahead.arrayZ, lookup.len,
+ lookup.arrayZ, lookup_context));
}
inline bool sanitize (hb_sanitize_context_t *c) const
{this, this, this}
};
chain_context_closure_lookup (c,
- backtrack.len, (const HBUINT16 *) backtrack.array,
- input.len, (const HBUINT16 *) input.array + 1,
- lookahead.len, (const HBUINT16 *) lookahead.array,
- lookup.len, lookup.array,
+ backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
+ input.len, (const HBUINT16 *) input.arrayZ + 1,
+ lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
+ lookup.len, lookup.arrayZ,
lookup_context);
}
{this, this, this}
};
chain_context_collect_glyphs_lookup (c,
- backtrack.len, (const HBUINT16 *) backtrack.array,
- input.len, (const HBUINT16 *) input.array + 1,
- lookahead.len, (const HBUINT16 *) lookahead.array,
- lookup.len, lookup.array,
+ backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
+ input.len, (const HBUINT16 *) input.arrayZ + 1,
+ lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
+ lookup.len, lookup.arrayZ,
lookup_context);
}
{this, this, this}
};
return_trace (chain_context_would_apply_lookup (c,
- backtrack.len, (const HBUINT16 *) backtrack.array,
- input.len, (const HBUINT16 *) input.array + 1,
- lookahead.len, (const HBUINT16 *) lookahead.array,
- lookup.len, lookup.array, lookup_context));
+ backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
+ input.len, (const HBUINT16 *) input.arrayZ + 1,
+ lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
+ lookup.len, lookup.arrayZ, lookup_context));
}
inline const Coverage &get_coverage (void) const
{this, this, this}
};
return_trace (chain_context_apply_lookup (c,
- backtrack.len, (const HBUINT16 *) backtrack.array,
- input.len, (const HBUINT16 *) input.array + 1,
- lookahead.len, (const HBUINT16 *) lookahead.array,
- lookup.len, lookup.array, lookup_context));
+ backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
+ input.len, (const HBUINT16 *) input.arrayZ + 1,
+ lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
+ lookup.len, lookup.arrayZ, lookup_context));
}
inline bool sanitize (hb_sanitize_context_t *c) const
if (version != 0x00020000 || glyph >= glyphNameIndex->len)
return hb_bytes_t ();
- unsigned int index = glyphNameIndex->array[glyph];
+ unsigned int index = glyphNameIndex->arrayZ[glyph];
if (index < NUM_FORMAT1_NAMES)
return format1_names (index);
index -= NUM_FORMAT1_NAMES;
if (index >= index_to_offset.len)
return hb_bytes_t ();
- unsigned int offset = index_to_offset.array[index];
+ unsigned int offset = index_to_offset.arrayZ[index];
const uint8_t *data = pool + offset;
unsigned int name_length = *data;
if (!len)
return value;
else /* len == 1*/
- return value - array[0].fromCoord + array[0].toCoord;
+ return value - arrayZ[0].fromCoord + arrayZ[0].toCoord;
}
- if (value <= array[0].fromCoord)
- return value - array[0].fromCoord + array[0].toCoord;
+ if (value <= arrayZ[0].fromCoord)
+ return value - arrayZ[0].fromCoord + arrayZ[0].toCoord;
unsigned int i;
unsigned int count = len;
- for (i = 1; i < count && value > array[i].fromCoord; i++)
+ for (i = 1; i < count && value > arrayZ[i].fromCoord; i++)
;
- if (value >= array[i].fromCoord)
- return value - array[i].fromCoord + array[i].toCoord;
+ if (value >= arrayZ[i].fromCoord)
+ return value - arrayZ[i].fromCoord + arrayZ[i].toCoord;
- if (unlikely (array[i-1].fromCoord == array[i].fromCoord))
- return array[i-1].toCoord;
+ if (unlikely (arrayZ[i-1].fromCoord == arrayZ[i].fromCoord))
+ return arrayZ[i-1].toCoord;
- int denom = array[i].fromCoord - array[i-1].fromCoord;
- return array[i-1].toCoord +
- ((array[i].toCoord - array[i-1].toCoord) *
- (value - array[i-1].fromCoord) + denom/2) / denom;
+ int denom = arrayZ[i].fromCoord - arrayZ[i-1].fromCoord;
+ return arrayZ[i-1].toCoord +
+ ((arrayZ[i].toCoord - arrayZ[i-1].toCoord) *
+ (value - arrayZ[i-1].fromCoord) + denom/2) / denom;
}
- DEFINE_SIZE_ARRAY (2, array);
+ DEFINE_SIZE_ARRAY (2, arrayZ);
};
struct avar
{
unsigned int len;
unsigned int allocated;
- Type *array;
+ Type *arrayZ;
Type static_array[StaticSize];
void init (void)
{
len = 0;
allocated = ARRAY_LENGTH (static_array);
- array = static_array;
+ arrayZ = static_array;
}
- inline Type& operator [] (unsigned int i) { return array[i]; }
- inline const Type& operator [] (unsigned int i) const { return array[i]; }
+ inline Type& operator [] (unsigned int i) { return arrayZ[i]; }
+ inline const Type& operator [] (unsigned int i) const { return arrayZ[i]; }
inline Type *push (void)
{
if (unlikely (!resize (len + 1)))
return nullptr;
- return &array[len - 1];
+ return &arrayZ[len - 1];
}
/* Allocate for size but don't adjust len. */
Type *new_array = nullptr;
- if (array == static_array) {
+ if (arrayZ == static_array) {
new_array = (Type *) calloc (new_allocated, sizeof (Type));
if (new_array)
- memcpy (new_array, array, len * sizeof (Type));
+ memcpy (new_array, arrayZ, len * sizeof (Type));
} else {
bool overflows = (new_allocated < allocated) || _hb_unsigned_int_mul_overflows (new_allocated, sizeof (Type));
if (likely (!overflows)) {
- new_array = (Type *) realloc (array, new_allocated * sizeof (Type));
+ new_array = (Type *) realloc (arrayZ, new_allocated * sizeof (Type));
}
}
if (unlikely (!new_array))
return false;
- array = new_array;
+ arrayZ = new_array;
allocated = new_allocated;
return true;
{
if (unlikely (i >= len))
return;
- memmove (static_cast<void *> (&array[i]),
- static_cast<void *> (&array[i + 1]),
+ memmove (static_cast<void *> (&arrayZ[i]),
+ static_cast<void *> (&arrayZ[i + 1]),
(len - i - 1) * sizeof (Type));
len--;
}
template <typename T>
inline Type *find (T v) {
for (unsigned int i = 0; i < len; i++)
- if (array[i] == v)
- return &array[i];
+ if (arrayZ[i] == v)
+ return &arrayZ[i];
return nullptr;
}
template <typename T>
inline const Type *find (T v) const {
for (unsigned int i = 0; i < len; i++)
- if (array[i] == v)
- return &array[i];
+ if (arrayZ[i] == v)
+ return &arrayZ[i];
return nullptr;
}
inline void qsort (int (*cmp)(const void*, const void*))
{
- ::qsort (array, len, sizeof (Type), cmp);
+ ::qsort (arrayZ, len, sizeof (Type), cmp);
}
inline void qsort (void)
{
- ::qsort (array, len, sizeof (Type), Type::cmp);
+ ::qsort (arrayZ, len, sizeof (Type), Type::cmp);
}
inline void qsort (unsigned int start, unsigned int end)
{
- ::qsort (array + start, end - start, sizeof (Type), Type::cmp);
+ ::qsort (arrayZ + start, end - start, sizeof (Type), Type::cmp);
}
template <typename T>
inline Type *lsearch (const T &x)
{
for (unsigned int i = 0; i < len; i++)
- if (0 == this->array[i].cmp (&x))
- return &array[i];
+ if (0 == this->arrayZ[i].cmp (&x))
+ return &arrayZ[i];
return nullptr;
}
inline Type *bsearch (const T &x)
{
unsigned int i;
- return bfind (x, &i) ? &array[i] : nullptr;
+ return bfind (x, &i) ? &arrayZ[i] : nullptr;
}
template <typename T>
inline const Type *bsearch (const T &x) const
{
unsigned int i;
- return bfind (x, &i) ? &array[i] : nullptr;
+ return bfind (x, &i) ? &arrayZ[i] : nullptr;
}
template <typename T>
inline bool bfind (const T &x, unsigned int *i) const
while (min <= max)
{
int mid = (min + max) / 2;
- int c = this->array[mid].cmp (&x);
+ int c = this->arrayZ[mid].cmp (&x);
if (c < 0)
max = mid - 1;
else if (c > 0)
return true;
}
}
- if (max < 0 || (max < (int) this->len && this->array[max].cmp (&x) > 0))
+ if (max < 0 || (max < (int) this->len && this->arrayZ[max].cmp (&x) > 0))
max++;
*i = max;
return false;
inline void fini (void)
{
- if (array != static_array)
- free (array);
- array = nullptr;
+ if (arrayZ != static_array)
+ free (arrayZ);
+ arrayZ = nullptr;
allocated = len = 0;
}
};
if (!resize (count))
return;
population = other->population;
- memcpy (pages.array, other->pages.array, count * sizeof (pages.array[0]));
- memcpy (page_map.array, other->page_map.array, count * sizeof (page_map.array[0]));
+ memcpy (pages.arrayZ, other->pages.arrayZ, count * sizeof (pages.arrayZ[0]));
+ memcpy (page_map.arrayZ, other->page_map.arrayZ, count * sizeof (page_map.arrayZ[0]));
}
inline bool is_equal (const hb_set_t *other) const
unsigned int face_length = table_count * 16 + 12;
for (unsigned int i = 0; i < table_count; i++)
- face_length += _hb_ceil_to_4 (hb_blob_get_length (data->tables.array[i].blob));
+ face_length += _hb_ceil_to_4 (hb_blob_get_length (data->tables.arrayZ[i].blob));
char *buf = (char *) malloc (face_length);
if (unlikely (!buf))