aboutsummaryrefslogtreecommitdiff
path: root/room.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2016-04-12 19:24:49 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2016-05-02 19:22:45 +0900
commitabfdceda30179c7e7f6fcd72bcb994ee4a9bba5e (patch)
treef837cad919b364cdf89d3dfe0f752cada4c58e10 /room.cpp
parent32b055f56287e97d84a4431a36909027991ef1fc (diff)
downloadlibquotient-abfdceda30179c7e7f6fcd72bcb994ee4a9bba5e.tar.gz
libquotient-abfdceda30179c7e7f6fcd72bcb994ee4a9bba5e.zip
Mark read-only accessors in Room::Private as const.
Diffstat (limited to 'room.cpp')
-rw-r--r--room.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/room.cpp b/room.cpp
index b770c85c..bc8aaf1d 100644
--- a/room.cpp
+++ b/room.cpp
@@ -73,9 +73,9 @@ class Room::Private: public QObject
// operation.
//void inviteUser(User* u); // We might get it at some point in time.
void addMember(User* u);
- bool hasMember(User* u);
+ bool hasMember(User* u) const;
// You can't identify a single user by displayname, only by id
- User* member(QString id);
+ User* member(QString id) const;
void renameMember(User* u, QString oldName);
void removeMember(User* u);
};
@@ -229,12 +229,12 @@ void Room::Private::addMember(User *u)
}
}
-bool Room::Private::hasMember(User* u)
+bool Room::Private::hasMember(User* u) const
{
return membersMap.values(u->name()).contains(u);
}
-User* Room::Private::member(QString id)
+User* Room::Private::member(QString id) const
{
User* u = connection->user(id);
return hasMember(u) ? u : nullptr;