summary refs log tree commit diff
path: root/src/ui/RoomSettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/RoomSettings.cpp')
-rw-r--r--src/ui/RoomSettings.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/RoomSettings.cpp b/src/ui/RoomSettings.cpp
index 546cda29..67be0bbb 100644
--- a/src/ui/RoomSettings.cpp
+++ b/src/ui/RoomSettings.cpp
@@ -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));