aboutsummaryrefslogtreecommitdiff
path: root/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'connection.cpp')
-rw-r--r--connection.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/connection.cpp b/connection.cpp
index 0c73e22d..f9e2e7ae 100644
--- a/connection.cpp
+++ b/connection.cpp
@@ -159,10 +159,10 @@ void Connection::sync(int timeout)
callApi<SyncJob>(d->data->lastEvent(), filter, timeout);
connect( job, &SyncJob::success, [=] () {
d->data->setLastEvent(job->nextBatch());
- for( auto& roomData: job->roomData() )
+ for( auto&& roomData: job->takeRoomData() )
{
- if ( Room* r = provideRoom(roomData.roomId) )
- r->updateData(roomData);
+ if ( auto* r = provideRoom(roomData.roomId) )
+ r->updateData(std::move(roomData));
}
d->syncJob = nullptr;
emit syncDone();