Skip to content

Commit 05e449d

Browse files
committed
LibCore: Simplify how we calculate processed event count
1 parent 25764fb commit 05e449d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Libraries/LibCore/ThreadEventQueue.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ size_t ThreadEventQueue::process()
114114
m_private->pending_promises.remove_all_matching([](auto& job) { return job->is_resolved() || job->is_rejected(); });
115115
}
116116

117-
size_t processed_events = 0;
118117
for (auto& queued_event : events) {
119118
if (auto receiver = queued_event.receiver.strong_ref()) {
120119
switch (queued_event.event_type) {
@@ -138,10 +137,9 @@ size_t ThreadEventQueue::process()
138137
// Receiver gone, drop the event.
139138
}
140139
}
141-
++processed_events;
142140
}
143141

144-
return processed_events;
142+
return events.size();
145143
}
146144

147145
bool ThreadEventQueue::has_pending_events() const

0 commit comments

Comments
 (0)