diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-07 19:02:35 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-08 17:43:58 +0200 |
commit | f4a20cc3710ee8f4b1788f73d05466aa0e660d61 (patch) | |
tree | e011f1f8ec8f03de0d176f73f5d3300fb5ab688c /lib/room.cpp | |
parent | e7a4b5a545b0f59b95ca8097009dbf6eea534db1 (diff) | |
download | libquotient-f4a20cc3710ee8f4b1788f73d05466aa0e660d61.tar.gz libquotient-f4a20cc3710ee8f4b1788f73d05466aa0e660d61.zip |
More cleanup
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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<TypingEvent>(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(); } |