mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Reduce windows ci warnings
This commit is contained in:
parent
22a6b8ddb4
commit
42a23e1859
4 changed files with 7 additions and 6 deletions
|
@ -3873,9 +3873,10 @@ Cache::spaces()
|
|||
std::string_view room_data;
|
||||
if (roomsDb_.get(txn, space_id, room_data)) {
|
||||
RoomInfo tmp = nlohmann::json::parse(std::move(room_data)).get<RoomInfo>();
|
||||
ret.insert(QString::fromUtf8(space_id.data(), space_id.size()), tmp);
|
||||
ret.insert(QString::fromUtf8(space_id.data(), (qsizetype)space_id.size()), tmp);
|
||||
} else {
|
||||
ret.insert(QString::fromUtf8(space_id.data(), space_id.size()), std::nullopt);
|
||||
ret.insert(QString::fromUtf8(space_id.data(), (qsizetype)space_id.size()),
|
||||
std::nullopt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -490,13 +490,13 @@ private:
|
|||
if (!eventsDb.get(
|
||||
txn, nlohmann::json::parse(data)["id"].get<std::string>(), value))
|
||||
return std::nullopt;
|
||||
} catch (std::exception &e) {
|
||||
} catch (std::exception &) {
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
return nlohmann::json::parse(value).get<mtx::events::StateEvent<T>>();
|
||||
} catch (std::exception &e) {
|
||||
} catch (std::exception &) {
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
QString roomName() const { return QString::fromStdString(info_.name); }
|
||||
int memberCount() const { return info_.member_count; }
|
||||
int memberCount() const { return (int)info_.member_count; }
|
||||
QString avatarUrl() const { return QString::fromStdString(info_.avatar_url); }
|
||||
QString roomId() const { return room_id_; }
|
||||
int numUsersLoaded() const { return numUsersLoaded_; }
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
return room && room->membership == mtx::events::state::Membership::Invite;
|
||||
}
|
||||
bool isSpace() const { return room && room->room_type == mtx::events::state::room_type::space; }
|
||||
int memberCount() const { return room ? room->num_joined_members : 0; }
|
||||
int memberCount() const { return room ? (int)room->num_joined_members : 0; }
|
||||
bool isKnockOnly() const
|
||||
{
|
||||
return room && (room->join_rule == mtx::events::state::JoinRule::Knock ||
|
||||
|
|
Loading…
Reference in a new issue