Codechange: Use emplace with ICURun and UniscribeRun. (#12693)

This commit is contained in:
Peter Nelson
2024-05-18 09:17:38 +01:00
committed by GitHub
parent 856ec901ca
commit 3f5a354f37
2 changed files with 4 additions and 4 deletions

View File

@@ -302,7 +302,7 @@ static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutF
/* Add a range that spans the intersection of the remaining item and font run. */
int stop_pos = std::min(i.first, (cur_item + 1)->iCharPos);
assert(stop_pos - cur_pos > 0);
ranges.push_back(UniscribeRun(cur_pos, stop_pos - cur_pos, i.second, cur_item->a));
ranges.emplace_back(cur_pos, stop_pos - cur_pos, i.second, cur_item->a);
/* Shape the range. */
if (!UniscribeShapeRun(buff, ranges.back())) {