[set] Use hb_fill()
This commit is contained in:
parent
5fce8898e0
commit
ca0b7afee9
|
@ -1357,7 +1357,7 @@ struct CoverageFormat2
|
||||||
bool intersects (const hb_set_t *glyphs) const
|
bool intersects (const hb_set_t *glyphs) const
|
||||||
{
|
{
|
||||||
/* TODO Speed up, using hb_set_next() and bsearch()? */
|
/* TODO Speed up, using hb_set_next() and bsearch()? */
|
||||||
/* TODO Rewrite as dagger. */
|
/* TODO(iter) Rewrite as dagger. */
|
||||||
unsigned count = rangeRecord.len;
|
unsigned count = rangeRecord.len;
|
||||||
const RangeRecord *arr = rangeRecord.arrayZ;
|
const RangeRecord *arr = rangeRecord.arrayZ;
|
||||||
for (unsigned i = 0; i < count; i++)
|
for (unsigned i = 0; i < count; i++)
|
||||||
|
@ -1367,7 +1367,7 @@ struct CoverageFormat2
|
||||||
}
|
}
|
||||||
bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const
|
bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const
|
||||||
{
|
{
|
||||||
/* TODO Rewrite as dagger. */
|
/* TODO(iter) Rewrite as dagger. */
|
||||||
unsigned count = rangeRecord.len;
|
unsigned count = rangeRecord.len;
|
||||||
const RangeRecord *arr = rangeRecord.arrayZ;
|
const RangeRecord *arr = rangeRecord.arrayZ;
|
||||||
for (unsigned i = 0; i < count; i++) {
|
for (unsigned i = 0; i < count; i++) {
|
||||||
|
@ -1820,7 +1820,7 @@ struct ClassDefFormat1
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
}
|
}
|
||||||
/* TODO Speed up, using set overlap first? */
|
/* TODO Speed up, using set overlap first? */
|
||||||
/* TODO Rewrite as dagger. */
|
/* TODO(iter) Rewrite as dagger. */
|
||||||
HBUINT16 k; /* TODO(constexpr) use constructor to initialize. */
|
HBUINT16 k; /* TODO(constexpr) use constructor to initialize. */
|
||||||
k = klass;
|
k = klass;
|
||||||
const HBUINT16 *arr = classValue.arrayZ;
|
const HBUINT16 *arr = classValue.arrayZ;
|
||||||
|
@ -1994,7 +1994,7 @@ struct ClassDefFormat2
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
}
|
}
|
||||||
/* TODO Speed up, using set overlap first? */
|
/* TODO Speed up, using set overlap first? */
|
||||||
/* TODO Rewrite as dagger. */
|
/* TODO(iter) Rewrite as dagger. */
|
||||||
HBUINT16 k; /* TODO(constexpr) use constructor to initialize. */
|
HBUINT16 k; /* TODO(constexpr) use constructor to initialize. */
|
||||||
k = klass;
|
k = klass;
|
||||||
const RangeRecord *arr = rangeRecord.arrayZ;
|
const RangeRecord *arr = rangeRecord.arrayZ;
|
||||||
|
|
|
@ -540,9 +540,8 @@ struct hb_set_t
|
||||||
assert(workspace.length == pages.length);
|
assert(workspace.length == pages.length);
|
||||||
hb_vector_t<unsigned>& old_index_to_page_map_index = workspace;
|
hb_vector_t<unsigned>& old_index_to_page_map_index = workspace;
|
||||||
|
|
||||||
for (unsigned i = 0; i < old_index_to_page_map_index.length; i++)
|
hb_fill (old_index_to_page_map_index.writer(), 0xFFFFFFFF);
|
||||||
old_index_to_page_map_index[i] = 0xFFFFFFFF;
|
/* TODO(iter) Rewrite as dagger? */
|
||||||
|
|
||||||
for (unsigned i = 0; i < length; i++)
|
for (unsigned i = 0; i < length; i++)
|
||||||
old_index_to_page_map_index[page_map[i].index] = i;
|
old_index_to_page_map_index[page_map[i].index] = i;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue