QList::{size,length}() changed fron inline int to qsizetype

References:
- https://doc.qt.io/qt-6/qlist.html#length
- https://www.qt.io/blog/qlist-changes-in-qt-6
This commit is contained in:
zneix 2021-07-31 02:00:20 +02:00
parent 19a2b2eb61
commit 32f81a668f
No known key found for this signature in database
GPG key ID: 911916E0523B22F6
2 changed files with 3 additions and 2 deletions

View file

@ -888,7 +888,7 @@ QString CommandController::execCommand(const QString &textNoEmoji,
} }
} }
auto maxSpaces = std::min(this->maxSpaces_, words.length() - 1); auto maxSpaces = std::min(this->maxSpaces_, 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];

View file

@ -37,7 +37,8 @@ std::vector<QStringList> getEmoteSetBatches(QStringList emoteSetKeys)
{ {
QStringList batch; QStringList batch;
int last = std::min(batchSize, emoteSetKeys.size() - batchSize * i); int last =
std::min(batchSize, 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)));