summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh18
1 files changed, 6 insertions, 12 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
index b480af51d2c..fa40223b725 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh
@@ -103,7 +103,12 @@ struct COLR
unsigned int *count, /* IN/OUT. May be NULL. */
hb_ot_color_layer_t *layers /* OUT. May be NULL. */) const
{
- const BaseGlyphRecord &record = get_glyph_record (glyph);
+ const BaseGlyphRecord *rec = (BaseGlyphRecord *) bsearch (&glyph,
+ &(this+baseGlyphsZ),
+ numBaseGlyphs,
+ sizeof (BaseGlyphRecord),
+ BaseGlyphRecord::cmp);
+ const BaseGlyphRecord &record = rec ? *rec : Null (BaseGlyphRecord);
hb_array_t<const LayerRecord> all_layers ((this+layersZ).arrayZ, numLayers);
hb_array_t<const LayerRecord> glyph_layers = all_layers.sub_array (record.firstLayerIdx,
@@ -129,17 +134,6 @@ struct COLR
(this+layersZ).sanitize (c, numLayers)));
}
- private:
- inline const BaseGlyphRecord &get_glyph_record (hb_codepoint_t glyph_id) const
- {
- const BaseGlyphRecord *rec = (BaseGlyphRecord *) bsearch (&glyph_id,
- &(this+baseGlyphsZ),
- numBaseGlyphs,
- sizeof (BaseGlyphRecord),
- BaseGlyphRecord::cmp);
- return rec ? *rec : Null(BaseGlyphRecord);
- }
-
protected:
HBUINT16 version; /* Table version number (starts at 0). */
HBUINT16 numBaseGlyphs; /* Number of Base Glyph Records. */