diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-25 14:37:49 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-25 14:37:49 +0900 |
commit | fea4f3b5c8d313b429777a8c73ee520af24eecfe (patch) | |
tree | 53729e5626466251f91b8b4fefb68d0fff82b26d | |
parent | be336237914ae4517e21f6e82d6c6facf16660d8 (diff) | |
download | libquotient-fea4f3b5c8d313b429777a8c73ee520af24eecfe.tar.gz libquotient-fea4f3b5c8d313b429777a8c73ee520af24eecfe.zip |
ReceiptEvent: code cleanup
-rw-r--r-- | events/receiptevent.cpp | 4 | ||||
-rw-r--r-- | events/receiptevent.h | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/events/receiptevent.cpp b/events/receiptevent.cpp index e30fe4e4..3c4d34ee 100644 --- a/events/receiptevent.cpp +++ b/events/receiptevent.cpp @@ -43,10 +43,10 @@ using namespace QMatrixClient; ReceiptEvent::ReceiptEvent(const QJsonObject& obj) : Event(Type::Receipt, obj) { - Q_ASSERT(obj["type"].toString() == jsonType); + Q_ASSERT(obj["type"].toString() == TypeId); const QJsonObject contents = contentJson(); - _eventsWithReceipts.reserve(static_cast<size_t>(contents.size())); + _eventsWithReceipts.reserve(contents.size()); for( auto eventIt = contents.begin(); eventIt != contents.end(); ++eventIt ) { if (eventIt.key().isEmpty()) diff --git a/events/receiptevent.h b/events/receiptevent.h index 9494c7c6..92dace82 100644 --- a/events/receiptevent.h +++ b/events/receiptevent.h @@ -48,7 +48,5 @@ namespace QMatrixClient private: EventsWithReceipts _eventsWithReceipts; bool _unreadMessages; // Spec extension for caching purposes - - static constexpr const char * jsonType = "m.receipt"; }; } // namespace QMatrixClient |