From f4a20cc3710ee8f4b1788f73d05466aa0e660d61 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 7 May 2022 19:02:35 +0200 Subject: More cleanup --- lib/room.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/room.cpp') diff --git a/lib/room.cpp b/lib/room.cpp index 183e242a..4d9f952c 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -3064,15 +3064,16 @@ Room::Changes Room::processEphemeralEvent(EventPtr&& event) QElapsedTimer et; et.start(); if (auto* evt = eventCast(event)) { + const auto& users = evt->users(); d->usersTyping.clear(); - d->usersTyping.reserve(evt->users().size()); // Assume all are members - for (const auto& userId : evt->users()) + d->usersTyping.reserve(users.size()); // Assume all are members + for (const auto& userId : users) if (isMember(userId)) d->usersTyping.append(user(userId)); - if (evt->users().size() > 3 || et.nsecsElapsed() >= profilerMinNsecs()) + if (users.size() > 3 || et.nsecsElapsed() >= profilerMinNsecs()) qCDebug(PROFILER) - << "Processing typing events from" << evt->users().size() + << "Processing typing events from" << users.size() << "user(s) in" << objectName() << "took" << et; emit typingChanged(); } -- cgit v1.2.3