diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-27 22:53:02 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-27 22:53:02 +0100 |
commit | ce4e878040946b963b30c4768847e2be24dd77fa (patch) | |
tree | 198dd81397aa1cf9fd7f2ad5bcd328cbb823d82b | |
parent | 102ed8b661e6ca66d754de0d102713d930fb224d (diff) | |
download | libquotient-ce4e878040946b963b30c4768847e2be24dd77fa.tar.gz libquotient-ce4e878040946b963b30c4768847e2be24dd77fa.zip |
basicEventJson(): dismiss with the template
Given that QJsonObject only accepts QStrings in the list constructor,
the template is useless cruft.
-rw-r--r-- | lib/events/event.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/events/event.h b/lib/events/event.h index 024e45ef..733fadd8 100644 --- a/lib/events/event.h +++ b/lib/events/event.h @@ -48,11 +48,10 @@ static const auto PrevContentKeyL = "prev_content"_ls; static const auto StateKeyKeyL = "state_key"_ls; /// Make a minimal correct Matrix event JSON -template <typename StrT> -inline QJsonObject basicEventJson(StrT matrixType, const QJsonObject& content) +inline QJsonObject basicEventJson(const QString& matrixType, + const QJsonObject& content) { - return { { TypeKey, std::forward<StrT>(matrixType) }, - { ContentKey, content } }; + return { { TypeKey, matrixType }, { ContentKey, content } }; } // === Event types and event types registry === |