From 14302ddbac1e6d9c95de15c97362c3de09f545eb Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 7 Oct 2016 16:20:20 +0900 Subject: Fixed massive leaks of Event objects --- connection.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'connection.cpp') diff --git a/connection.cpp b/connection.cpp index 9f56ec96..bc6d1f26 100644 --- a/connection.cpp +++ b/connection.cpp @@ -18,7 +18,6 @@ #include "connection.h" #include "connectiondata.h" -//#include "connectionprivate.h" #include "user.h" #include "events/event.h" #include "room.h" @@ -172,7 +171,7 @@ void Connection::sync(int timeout) auto job = d->startSyncJob(filter, timeout); connect( job, &SyncJob::success, [=] () { d->data->setLastEvent(job->nextBatch()); - for( const auto& roomData: job->roomData() ) + for( auto& roomData: job->roomData() ) { if ( Room* r = provideRoom(roomData.roomId) ) r->updateData(roomData); -- cgit v1.2.3