Fix some compiler warnings

This commit is contained in:
Nicolas Werner 2020-12-25 00:08:06 +00:00
parent 100b5e0371
commit 01e38d12ed
17 changed files with 51 additions and 50 deletions

View file

@ -104,7 +104,7 @@ CommunitiesList::setTagsForRoom(const QString &room_id, const std::vector<std::s
}
// insert or remove the room from the tag as appropriate
std::string current_tag =
it->first.right(it->first.size() - strlen("tag:")).toStdString();
it->first.right(static_cast<int>(it->first.size() - strlen("tag:"))).toStdString();
if (std::find(tags.begin(), tags.end(), current_tag) != tags.end()) {
// the room has this tag
it->second->addRoom(room_id);
@ -246,7 +246,7 @@ CommunitiesList::fetchCommunityAvatar(const QString &id, const QString &avatarUr
cache::saveImage(opts.mxc_url, res);
auto data = QByteArray(res.data(), res.size());
auto data = QByteArray(res.data(), (int)res.size());
QPixmap pix;
pix.loadFromData(data);