summary refs log tree commit diff
path: root/src/ui/RoomSettings.cpp
diff options
context:
space:
mode:
authorZhymabek Roman <61125068+ZhymabekRoman@users.noreply.github.com>2023-01-02 21:59:29 +0600
committerGitHub <noreply@github.com>2023-01-02 21:59:29 +0600
commit59410a99ac9b5a90356adc2192b8c6107456c78f (patch)
treef42e081641cee3d62057208f3af1de3afddd02e6 /src/ui/RoomSettings.cpp
parentAppImage: reduce package size (diff)
parentA whole new year full of excitement and possibilities! (diff)
downloadnheko-59410a99ac9b5a90356adc2192b8c6107456c78f.tar.xz
Merge branch 'master' into master
Diffstat (limited to 'src/ui/RoomSettings.cpp')
-rw-r--r--src/ui/RoomSettings.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/RoomSettings.cpp b/src/ui/RoomSettings.cpp

index 546cda29..380ed295 100644 --- a/src/ui/RoomSettings.cpp +++ b/src/ui/RoomSettings.cpp
@@ -1,5 +1,6 @@ // SPDX-FileCopyrightText: 2021 Nheko Contributors // SPDX-FileCopyrightText: 2022 Nheko Contributors +// SPDX-FileCopyrightText: 2023 Nheko Contributors // // SPDX-License-Identifier: GPL-3.0-or-later @@ -132,7 +133,7 @@ RoomSettings::roomAvatarUrl() int RoomSettings::memberCount() const { - return info_.member_count; + return static_cast<int>(info_.member_count); } void @@ -180,7 +181,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));