diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-12-10 19:26:23 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-01-23 22:40:20 +0100 |
commit | 08612cb253417fe70ef45a1ad08663a0745d748a (patch) | |
tree | 832f57e533a0f07365f6e20b091ddfc18f9169f4 /lib/events/roommemberevent.h | |
parent | 9ae0d4e45befc79f621b03dc4efe869cd4277e06 (diff) | |
download | libquotient-08612cb253417fe70ef45a1ad08663a0745d748a.tar.gz libquotient-08612cb253417fe70ef45a1ad08663a0745d748a.zip |
No more default construction of events
Default construction was only done to support stubbed state in Room
and even that did not really use those, opting to construct an event
from an empty QJsonObject instead. Now that Room doesn't have
stubbed state, default constructors are even less needed.
Diffstat (limited to 'lib/events/roommemberevent.h')
-rw-r--r-- | lib/events/roommemberevent.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/events/roommemberevent.h b/lib/events/roommemberevent.h index 5e446dbe..3296ae22 100644 --- a/lib/events/roommemberevent.h +++ b/lib/events/roommemberevent.h @@ -15,9 +15,7 @@ public: using MembershipType [[deprecated("Use Quotient::Membership instead")]] = Membership; - explicit MemberEventContent(Membership ms = Membership::Join) - : membership(ms) - {} + explicit(false) MemberEventContent(Membership ms) : membership(ms) {} explicit MemberEventContent(const QJsonObject& json); Membership membership; @@ -43,10 +41,8 @@ public: explicit RoomMemberEvent(const QJsonObject& obj) : StateEvent(typeId(), obj) {} - template <typename... ArgTs> - RoomMemberEvent(const QString& userId, ArgTs&&... contentArgs) - : StateEvent(typeId(), matrixTypeId(), userId, - std::forward<ArgTs>(contentArgs)...) + RoomMemberEvent(const QString& userId, MemberEventContent&& content) + : StateEvent(typeId(), matrixTypeId(), userId, std::move(content)) {} //! \brief A special constructor to create unknown RoomMemberEvents |