From 2a54e66226863bdea4b0828675f38b75e4c7776f Mon Sep 17 00:00:00 2001 From: Black Hat Date: Wed, 1 Jan 2020 14:04:47 +0800 Subject: Mark methods as const. --- lib/events/roompowerlevelsevent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/events/roompowerlevelsevent.cpp') diff --git a/lib/events/roompowerlevelsevent.cpp b/lib/events/roompowerlevelsevent.cpp index a6efaa63..aff64cff 100644 --- a/lib/events/roompowerlevelsevent.cpp +++ b/lib/events/roompowerlevelsevent.cpp @@ -31,7 +31,7 @@ void PowerLevelsEventContent::fillJson(QJsonObject* o) const { o->insert(QStringLiteral("notifications"), {{"room", notifications.room}}); } -int RoomPowerLevelsEvent::powerLevelForEvent(const QString &eventId) { +int RoomPowerLevelsEvent::powerLevelForEvent(const QString &eventId) const { auto e = events(); if (e.contains(eventId)) { @@ -41,7 +41,7 @@ int RoomPowerLevelsEvent::powerLevelForEvent(const QString &eventId) { return eventsDefault(); } -int RoomPowerLevelsEvent::powerLevelForUser(const QString &userId) { +int RoomPowerLevelsEvent::powerLevelForUser(const QString &userId) const { auto u = users(); if (u.contains(userId)) { -- cgit v1.2.3