aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--room.cpp2
-rw-r--r--room.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/room.cpp b/room.cpp
index 325e81bc..7c19fba0 100644
--- a/room.cpp
+++ b/room.cpp
@@ -504,7 +504,6 @@ bool Room::Private::isEventNotable(const Event* e) const
void Room::doAddNewMessageEvents(const Events& events)
{
- d->messageEvents.reserve(d->messageEvents.size() + events.size());
Timeline::size_type newUnreadMessages = 0;
@@ -554,7 +553,6 @@ void Room::addHistoricalMessageEvents(const Events& events)
void Room::doAddHistoricalMessageEvents(const Events& events)
{
// Historical messages arrive in newest-to-oldest order
- d->messageEvents.reserve(d->messageEvents.size() + events.size());
std::copy(events.begin(), events.end(), std::front_inserter(d->messageEvents));
}
diff --git a/room.h b/room.h
index afa6f0ef..f42f6947 100644
--- a/room.h
+++ b/room.h
@@ -26,6 +26,8 @@
#include "jobs/syncjob.h"
#include "joinstate.h"
+#include <deque>
+
namespace QMatrixClient
{
class Event;
@@ -38,7 +40,7 @@ namespace QMatrixClient
Q_OBJECT
Q_PROPERTY(QString readMarkerEventId READ readMarkerEventId WRITE markMessagesAsRead NOTIFY readMarkerPromoted)
public:
- using Timeline = Owning<Events>;
+ using Timeline = Owning< std::deque<Event*> >;
Room(Connection* connection, QString id);
virtual ~Room();