[subset] don't use << operator in collect_mapping

This commit is contained in:
Qunxin Liu 2020-05-15 10:52:49 -07:00 committed by Behdad Esfahbod
parent ba3c77ef23
commit 10d6605bbe
1 changed files with 12 additions and 12 deletions

View File

@ -63,8 +63,8 @@ struct CmapSubtableFormat0
if (glyphIdArray[i]) if (glyphIdArray[i])
{ {
hb_codepoint_t glyph = glyphIdArray[i]; hb_codepoint_t glyph = glyphIdArray[i];
*unicodes << i; unicodes->add (i);
*mapping << hb_pair_t<hb_codepoint_t, hb_codepoint_t> (i, glyph); mapping->set (i, glyph);
} }
} }
@ -406,8 +406,8 @@ struct CmapSubtableFormat4
hb_codepoint_t gid = (codepoint + this->idDelta[i]) & 0xFFFFu; hb_codepoint_t gid = (codepoint + this->idDelta[i]) & 0xFFFFu;
if (unlikely (!gid)) if (unlikely (!gid))
continue; continue;
*unicodes << codepoint; unicodes->add (codepoint);
*mapping << hb_pair_t<hb_codepoint_t, hb_codepoint_t> (codepoint, gid); mapping->set (codepoint, gid);
} }
} }
else else
@ -420,8 +420,8 @@ struct CmapSubtableFormat4
hb_codepoint_t gid = this->glyphIdArray[index]; hb_codepoint_t gid = this->glyphIdArray[index];
if (unlikely (!gid)) if (unlikely (!gid))
continue; continue;
*unicodes << codepoint; unicodes->add (codepoint);
*mapping << hb_pair_t<hb_codepoint_t, hb_codepoint_t> (codepoint, gid); mapping->set (codepoint, gid);
} }
} }
} }
@ -566,8 +566,8 @@ struct CmapSubtableTrimmed
{ {
hb_codepoint_t unicode = start_cp + i; hb_codepoint_t unicode = start_cp + i;
hb_codepoint_t glyphid = glyphIdArray[i]; hb_codepoint_t glyphid = glyphIdArray[i];
*unicodes << unicode; unicodes->add (unicode);
*mapping << hb_pair_t<hb_codepoint_t, hb_codepoint_t> (unicode, glyphid); mapping->set (unicode, glyphid);
} }
} }
@ -652,8 +652,8 @@ struct CmapSubtableLongSegmented
for (unsigned cp = start; cp <= end; cp++) for (unsigned cp = start; cp <= end; cp++)
{ {
*unicodes << cp; unicodes->add (cp);
*mapping << hb_pair_t<hb_codepoint_t, hb_codepoint_t> (cp, gid); mapping->set (cp, gid);
gid++; gid++;
} }
} }
@ -893,8 +893,8 @@ struct NonDefaultUVS : SortedArrayOf<UVSMapping, HBUINT32>
{ {
hb_codepoint_t unicode = arrayZ[i].unicodeValue; hb_codepoint_t unicode = arrayZ[i].unicodeValue;
hb_codepoint_t glyphid = arrayZ[i].glyphID; hb_codepoint_t glyphid = arrayZ[i].glyphID;
*unicodes << unicode; unicodes->add (unicode);
*mapping << hb_pair_t<hb_codepoint_t, hb_codepoint_t> (unicode, glyphid); mapping->set (unicode, glyphid);
} }
} }