diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-10-02 11:46:52 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-10-02 11:46:52 +0900 |
commit | 21fa206adab838fe90c84b16e910d1b696da0e28 (patch) | |
tree | 99d261f17023dc90b2afb3a23fd8e524f4685aa5 | |
parent | 79f52e3f6142afd48d30b842618ef0867072443b (diff) | |
download | libquotient-21fa206adab838fe90c84b16e910d1b696da0e28.tar.gz libquotient-21fa206adab838fe90c84b16e910d1b696da0e28.zip |
Room::id(): return cref
A cref is still faster than incrementing a refcounter in QString, and all the other COW stuff, and room id is not supposed to change ever.
-rw-r--r-- | room.cpp | 2 | ||||
-rw-r--r-- | room.h | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -155,7 +155,7 @@ Room::~Room() delete d; } -QString Room::id() const +const QString& Room::id() const { return d->id; } @@ -82,7 +82,7 @@ namespace QMatrixClient Connection* connection() const; User* localUser() const; - QString id() const; + const QString& id() const; QString name() const; QStringList aliases() const; QString canonicalAlias() const; |