mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
smol fix
This commit is contained in:
parent
184aba1be7
commit
ea54b10f1d
1 changed files with 4 additions and 2 deletions
|
@ -95,7 +95,7 @@ void EmoteInputPopup::updateEmotes(const QString &text, ChannelPtr channel)
|
|||
}
|
||||
|
||||
// if there is an exact match, put that emote first
|
||||
for (int i = 1; i < (int)emotes.size(); i++)
|
||||
for (size_t i = 1; i < emotes.size(); i++)
|
||||
{
|
||||
auto emoteText = emotes.at(i).displayName;
|
||||
|
||||
|
@ -103,7 +103,9 @@ void EmoteInputPopup::updateEmotes(const QString &text, ChannelPtr channel)
|
|||
if (emoteText.compare(text, Qt::CaseInsensitive) == 0 ||
|
||||
emoteText.compare(":" + text, Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
std::iter_swap(emotes.begin(), emotes.begin() + i);
|
||||
auto emote = emotes[i];
|
||||
emotes.erase(emotes.begin() + int(i));
|
||||
emotes.insert(emotes.begin(), emote);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue