Enable -Wconversion
This commit is contained in:
parent
5be8298d0a
commit
b28fa86e6a
23 changed files with 102 additions and 78 deletions
|
|
@ -82,7 +82,7 @@ MxcAnimatedImage::startDownload()
|
|||
std::string temp(ba.constData(), ba.size());
|
||||
temp =
|
||||
mtx::crypto::to_string(mtx::crypto::decrypt_file(temp, encryptionInfo.value()));
|
||||
buffer.setData(temp.data(), temp.size());
|
||||
buffer.setData(temp.data(), static_cast<int>(temp.size()));
|
||||
} else {
|
||||
buffer.setData(device.readAll());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ MxcMediaProxy::startDownload()
|
|||
QByteArray ba = device.readAll();
|
||||
std::string temp(ba.constData(), ba.size());
|
||||
temp = mtx::crypto::to_string(mtx::crypto::decrypt_file(temp, encryptionInfo.value()));
|
||||
buffer.setData(temp.data(), temp.size());
|
||||
buffer.setData(temp.data(), static_cast<int>(temp.size()));
|
||||
} else {
|
||||
buffer.setData(device.readAll());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ RoomSettings::roomAvatarUrl()
|
|||
int
|
||||
RoomSettings::memberCount() const
|
||||
{
|
||||
return info_.member_count;
|
||||
return static_cast<int>(info_.member_count);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -180,7 +180,8 @@ QStringList
|
|||
RoomSettings::allowedRooms() const
|
||||
{
|
||||
QStringList rooms;
|
||||
rooms.reserve(accessRules_.allow.size());
|
||||
assert(accessRules_.allow.size() < std::numeric_limits<int>::max());
|
||||
rooms.reserve(static_cast<int>(accessRules_.allow.size()));
|
||||
for (const auto &e : accessRules_.allow) {
|
||||
if (e.type == mtx::events::state::JoinAllowanceType::RoomMembership)
|
||||
rooms.push_back(QString::fromStdString(e.room_id));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue