diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-04-06 19:56:33 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-04-06 19:56:33 +0300 |
commit | 73e73f46eaff4f2236b31ed5858738c6b5e26ea3 (patch) | |
tree | 3af375ca4be03bacb34aa72b173dd22a9f792380 /include/Profile.h | |
parent | Initialize sync timer (diff) | |
download | nheko-73e73f46eaff4f2236b31ed5858738c6b5e26ea3.tar.xz |
Use const refs for the deserialized data
Diffstat (limited to 'include/Profile.h')
-rw-r--r-- | include/Profile.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/Profile.h b/include/Profile.h index a36393ec..acf81fda 100644 --- a/include/Profile.h +++ b/include/Profile.h @@ -26,14 +26,24 @@ class ProfileResponse : public Deserializable { public: - void deserialize(QJsonDocument data) throw(DeserializationException) override; + void deserialize(const QJsonDocument &data) throw(DeserializationException) override; - QUrl getAvatarUrl(); - QString getDisplayName(); + inline QUrl getAvatarUrl(); + inline QString getDisplayName(); private: QUrl avatar_url_; QString display_name_; }; +inline QUrl ProfileResponse::getAvatarUrl() +{ + return avatar_url_; +} + +inline QString ProfileResponse::getDisplayName() +{ + return display_name_; +} + #endif // PROFILE_H |