xcb: don't iterate over .keys()
... iterate over the container itself instead. Avoids temporary QList creation as well as the lookup cost when actually calling value(key). Saves more than 1KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: If4b2fb7eada0e9cde72ab101a5f6e5cb1ba64054 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>bb10
parent
4077e28daa
commit
369572f892
|
|
@ -833,9 +833,8 @@ void QXcbConnection::xi2HandleHierachyEvent(void *event)
|
|||
return;
|
||||
xi2SetupDevices();
|
||||
// Reselect events for all event-listening windows.
|
||||
Q_FOREACH (xcb_window_t window, m_mapper.keys()) {
|
||||
xi2Select(window);
|
||||
}
|
||||
for (auto it = m_mapper.cbegin(), end = m_mapper.cend(); it != end; ++it)
|
||||
xi2Select(it.key());
|
||||
}
|
||||
|
||||
void QXcbConnection::xi2HandleDeviceChangedEvent(void *event)
|
||||
|
|
|
|||
Loading…
Reference in New Issue