Fix build with Xcode.

This commit is contained in:
John Preston 2021-06-22 20:31:57 +04:00
parent 0028a534d2
commit f239f66ce5

View file

@ -3326,7 +3326,13 @@ TextForMimeData String::toText(
|| (type == EntityType::Cashtag); || (type == EntityType::Cashtag);
return std::pair{ entity.offset(), isUrl ? 0 : 1 }; return std::pair{ entity.offset(), isUrl ? 0 : 1 };
}; };
ranges::sort(result.rich.entities, std::less<>(), proj); const auto pred = [&](const EntityInText &a, const EntityInText &b) {
return proj(a) < proj(b);
};
std::sort(
result.rich.entities.begin(),
result.rich.entities.end(),
pred);
} }
return result; return result;