From 245859637fbcfcaa5e6067a7592ccf4053472ee8 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 13 Dec 2022 18:11:23 +0100 Subject: [PATCH] kwaylandserver: avoid creating unnecessary containers just to iterate --- src/wayland/keyboard_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/keyboard_interface.cpp b/src/wayland/keyboard_interface.cpp index 7894d69015..bd0a3c8389 100644 --- a/src/wayland/keyboard_interface.cpp +++ b/src/wayland/keyboard_interface.cpp @@ -214,7 +214,7 @@ void KeyboardInterface::setRepeatInfo(qint32 charactersPerSecond, qint32 delay) { d->keyRepeat.charactersPerSecond = std::max(charactersPerSecond, 0); d->keyRepeat.delay = std::max(delay, 0); - const QList keyboards = d->resourceMap().values(); + const auto keyboards = d->resourceMap(); for (KeyboardInterfacePrivate::Resource *keyboardResource : keyboards) { if (keyboardResource->version() >= WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION) { d->send_repeat_info(keyboardResource->handle, d->keyRepeat.charactersPerSecond, d->keyRepeat.delay);