2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-03 08:05:12 +00:00

Fix build for Xcode 9.3.1 and OS X 10.6-10.7.

This commit is contained in:
John Preston
2018-05-13 21:12:44 +03:00
parent f761b6aa9e
commit 4f9507ed97
3 changed files with 30 additions and 2 deletions

View File

@@ -204,8 +204,8 @@ void FlatTextarea::addInstantReplace(
const QString &what,
const QString &with) {
auto node = &_reverseInstantReplaces;
for (const auto ch : base::reversed(what)) {
node = &node->tail.emplace(ch, InstantReplaceNode()).first->second;
for (auto i = what.end(), b = what.begin(); i != b;) {
node = &node->tail.emplace(*--i, InstantReplaceNode()).first->second;
}
node->text = with;
accumulate_max(_instantReplaceMaxLength, int(what.size()));