mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Follow-up to 32f81a668f
Also, rather use `static_cast<int>(stuff)` than `int(stuff)`. See https://cdn.zneix.eu/JjHk5U4.png
This commit is contained in:
parent
52ef16418d
commit
4ba4a2f33c
|
@ -888,7 +888,8 @@ QString CommandController::execCommand(const QString &textNoEmoji,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto maxSpaces = std::min(this->maxSpaces_, int(words.length()) - 1);
|
auto maxSpaces =
|
||||||
|
std::min(this->maxSpaces_, static_cast<int>(words.length() - 1));
|
||||||
for (int i = 0; i < maxSpaces; ++i)
|
for (int i = 0; i < maxSpaces; ++i)
|
||||||
{
|
{
|
||||||
commandName += ' ' + words[i + 1];
|
commandName += ' ' + words[i + 1];
|
||||||
|
|
|
@ -37,8 +37,8 @@ std::vector<QStringList> getEmoteSetBatches(QStringList emoteSetKeys)
|
||||||
{
|
{
|
||||||
QStringList batch;
|
QStringList batch;
|
||||||
|
|
||||||
int last =
|
int last = std::min(
|
||||||
std::min(batchSize, int(emoteSetKeys.size()) - batchSize * i);
|
batchSize, static_cast<int>(emoteSetKeys.size() - batchSize * i));
|
||||||
for (int j = 0; j < last; j++)
|
for (int j = 0; j < last; j++)
|
||||||
{
|
{
|
||||||
batch.push_back(emoteSetKeys.at(j + (batchSize * i)));
|
batch.push_back(emoteSetKeys.at(j + (batchSize * i)));
|
||||||
|
|
|
@ -791,7 +791,8 @@ void TwitchMessageBuilder::runIgnoreReplaces(
|
||||||
}
|
}
|
||||||
twitchEmotes.push_back(TwitchEmoteOccurence{
|
twitchEmotes.push_back(TwitchEmoteOccurence{
|
||||||
startIndex + pos,
|
startIndex + pos,
|
||||||
startIndex + pos + emote.first.string.length(),
|
static_cast<int>(startIndex + pos +
|
||||||
|
emote.first.string.length()),
|
||||||
emote.second,
|
emote.second,
|
||||||
emote.first,
|
emote.first,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue