aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-04 16:06:29 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-04 16:06:29 +0900
commitf3221451ce29c3b571e08fe3ce51a49f252029e5 (patch)
tree71f49dd7bce85844db2fc7a544473b68014df537
parent04435ef1d621b18ad837cdcb4b06155952f51f0c (diff)
downloadlibquotient-f3221451ce29c3b571e08fe3ce51a49f252029e5.tar.gz
libquotient-f3221451ce29c3b571e08fe3ce51a49f252029e5.zip
DEFINE_SIMPLE_STATE_EVENT: fix construction from an rvalue QJsonObject
-rw-r--r--lib/events/simplestateevents.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/events/simplestateevents.h b/lib/events/simplestateevents.h
index 9a212612..3a59ad6d 100644
--- a/lib/events/simplestateevents.h
+++ b/lib/events/simplestateevents.h
@@ -65,8 +65,9 @@ namespace QMatrixClient
public: \
using value_type = content_type::value_type; \
DEFINE_EVENT_TYPEID(_TypeId, _Name) \
- explicit _Name(const QJsonObject& obj) \
- : StateEvent(typeId(), obj, QStringLiteral(#_ContentKey)) \
+ explicit _Name(QJsonObject obj) \
+ : StateEvent(typeId(), std::move(obj), \
+ QStringLiteral(#_ContentKey)) \
{ } \
template <typename T> \
explicit _Name(T&& value) \