ensure insert
has worked
This commit is contained in:
parent
e55918788c
commit
20cafae780
1 changed files with 11 additions and 8 deletions
|
@ -151,13 +151,15 @@ static void shape_text(text_line & line,
|
|||
// if we have a valid codepoint, save rendering info.
|
||||
|
||||
auto itr = glyphinfos.find(cluster);
|
||||
bool status = true;
|
||||
if (itr == glyphinfos.end())
|
||||
{
|
||||
std::vector<glyph_face_info> v = {{ face, glyphs[i], positions[i] }};
|
||||
bool result = false;
|
||||
std::tie(itr, result) = glyphinfos.insert(std::make_pair(cluster, v));
|
||||
std::tie(itr, status) = glyphinfos.insert(std::make_pair(cluster, v));
|
||||
|
||||
}
|
||||
if (status)
|
||||
{
|
||||
if (itr->second.front().glyph.codepoint == 0)
|
||||
{
|
||||
itr->second.front() = { face, glyphs[i], positions[i] };
|
||||
|
@ -167,6 +169,7 @@ static void shape_text(text_line & line,
|
|||
itr->second.push_back({ face, glyphs[i], positions[i] });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool all_set = true;
|
||||
for (auto c : clusters)
|
||||
|
|
Loading…
Reference in a new issue