diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-25 14:46:18 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-25 14:46:18 +0900 |
commit | cbfe29b3435fbe47fee268facbe6a82000fce0ad (patch) | |
tree | e922f1a1505ff1d0a3cdaca56ed5fd151c3aa410 /events/receiptevent.cpp | |
parent | b1dd0e7ea87842fb5ff9deb14beb3474136b06f3 (diff) | |
parent | a4a1129385731c3999a6d5986a24fc069938245c (diff) | |
download | libquotient-cbfe29b3435fbe47fee268facbe6a82000fce0ad.tar.gz libquotient-cbfe29b3435fbe47fee268facbe6a82000fce0ad.zip |
Merge branch 'master' into kitsune-gtad
Diffstat (limited to 'events/receiptevent.cpp')
-rw-r--r-- | events/receiptevent.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/events/receiptevent.cpp b/events/receiptevent.cpp index b36ddb23..e30fe4e4 100644 --- a/events/receiptevent.cpp +++ b/events/receiptevent.cpp @@ -56,15 +56,15 @@ ReceiptEvent::ReceiptEvent(const QJsonObject& obj) continue; } const QJsonObject reads = eventIt.value().toObject().value("m.read").toObject(); - std::vector<Receipt> receipts; - receipts.reserve(static_cast<size_t>(reads.size())); + QVector<Receipt> receipts; + receipts.reserve(reads.size()); for( auto userIt = reads.begin(); userIt != reads.end(); ++userIt ) { const QJsonObject user = userIt.value().toObject(); receipts.push_back({userIt.key(), QMatrixClient::fromJson<QDateTime>(user["ts"])}); } - _eventsWithReceipts.push_back({eventIt.key(), receipts}); + _eventsWithReceipts.push_back({eventIt.key(), std::move(receipts)}); } static const auto UnreadMsgsKey = QStringLiteral("x-qmatrixclient.unread_messages"); |