diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 3a169163a..0d04a3677 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -1357,7 +1357,7 @@ struct CoverageFormat2 bool intersects (const hb_set_t *glyphs) const { /* TODO Speed up, using hb_set_next() and bsearch()? */ - /* TODO Rewrite as dagger. */ + /* TODO(iter) Rewrite as dagger. */ unsigned count = rangeRecord.len; const RangeRecord *arr = rangeRecord.arrayZ; 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 { - /* TODO Rewrite as dagger. */ + /* TODO(iter) Rewrite as dagger. */ unsigned count = rangeRecord.len; const RangeRecord *arr = rangeRecord.arrayZ; for (unsigned i = 0; i < count; i++) { @@ -1820,7 +1820,7 @@ struct ClassDefFormat1 /* Fall through. */ } /* TODO Speed up, using set overlap first? */ - /* TODO Rewrite as dagger. */ + /* TODO(iter) Rewrite as dagger. */ HBUINT16 k; /* TODO(constexpr) use constructor to initialize. */ k = klass; const HBUINT16 *arr = classValue.arrayZ; @@ -1994,7 +1994,7 @@ struct ClassDefFormat2 /* Fall through. */ } /* TODO Speed up, using set overlap first? */ - /* TODO Rewrite as dagger. */ + /* TODO(iter) Rewrite as dagger. */ HBUINT16 k; /* TODO(constexpr) use constructor to initialize. */ k = klass; const RangeRecord *arr = rangeRecord.arrayZ; diff --git a/src/hb-set.hh b/src/hb-set.hh index 42a54350c..067e9cd82 100644 --- a/src/hb-set.hh +++ b/src/hb-set.hh @@ -540,9 +540,8 @@ struct hb_set_t assert(workspace.length == pages.length); hb_vector_t& old_index_to_page_map_index = workspace; - for (unsigned i = 0; i < old_index_to_page_map_index.length; i++) - old_index_to_page_map_index[i] = 0xFFFFFFFF; - + hb_fill (old_index_to_page_map_index.writer(), 0xFFFFFFFF); + /* TODO(iter) Rewrite as dagger? */ for (unsigned i = 0; i < length; i++) old_index_to_page_map_index[page_map[i].index] = i;