@@ -299,13 +299,13 @@ static std::vector<SCRIPT_ITEM> Uniscrib
int cur_pos = 0;
std::vector<SCRIPT_ITEM>::iterator cur_item = items.begin();
for (auto const &i : fontMapping) {
while (cur_pos < i.first && cur_item != items.end() - 1) {
/* Add a range that spans the intersection of the remaining item and font run. */
int stop_pos = min(i.first, (cur_item + 1)->iCharPos);
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));
/* Shape the range. */
if (!UniscribeShapeRun(buff, ranges.back())) {
return nullptr;
@@ -449,13 +449,13 @@ static std::vector<SCRIPT_ITEM> Uniscrib
* @return The maximum height of the line.
*/
int UniscribeParagraphLayout::UniscribeLine::GetLeading() const
{
int leading = 0;
for (const auto &run : *this) {
leading = max(leading, run.GetLeading());
leading = std::max(leading, run.GetLeading());
}
return leading;
/**