[subset/colr] minor improve to resolve msvc complain

MSVC says,
  hb-ot-color-colr-table.hh(215): warning C4700: uninitialized local variable 'new_record' used [build\harfbuzz-subset.vcxproj]
    harfbuzz-subset.vcxproj -> build\Debug\harfbuzz-subset.lib
This commit is contained in:
Ebrahim Byagowi 2020-02-11 16:46:14 +03:30
parent bca9bc6b92
commit cbb45c3ee7
1 changed files with 4 additions and 4 deletions

View File

@ -208,12 +208,12 @@ struct COLR
| hb_map_retains_sorting ([&](hb_codepoint_t new_gid)
{
hb_codepoint_t old_gid = reverse_glyph_map.get (new_gid);
const BaseGlyphRecord* old_record = get_base_glyph_record (old_gid);
if (unlikely (!old_record))
return hb_pair_t<bool, BaseGlyphRecord> (false, Null (BaseGlyphRecord));
BaseGlyphRecord new_record;
if (unlikely (!old_record))
return hb_pair_t<bool, BaseGlyphRecord> (false, new_record);
new_record.glyphId = new_gid;
new_record.numLayers = old_record->numLayers;
return hb_pair_t<bool, BaseGlyphRecord> (true, new_record);