summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2024-08-26 17:25:39 +0200
committerGitHub <noreply@github.com>2024-08-26 17:25:39 +0200
commit8d6c18076f3268a6c85c6085d29f898267028101 (patch)
tree9db19e850b0a3e2c5d20d5ca2ad5f9878eca89b1 /src/managers/input/InputManager.cpp
parent9c5a37a797ea1f1829859ab5b07016b2f27f739c (diff)
core: make most for loops use const references (#7527)
why not let the compiler optimise things for us at hyprspeeds when we can.
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index e5f921a2..a4a63a84 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -919,7 +919,7 @@ void CInputManager::setupKeyboard(SP<IKeyboard> keeb) {
}
void CInputManager::setKeyboardLayout() {
- for (auto& k : m_vKeyboards)
+ for (auto const& k : m_vKeyboards)
applyConfigToKeyboard(k);
g_pKeybindManager->updateXKBTranslationState();
@@ -1197,7 +1197,7 @@ void CInputManager::destroyKeyboard(SP<IKeyboard> pKeyboard) {
if (m_vKeyboards.size() > 0) {
bool found = false;
- for (auto& k : m_vKeyboards | std::views::reverse) {
+ for (auto const& k : m_vKeyboards | std::views::reverse) {
if (!k)
continue;
@@ -1673,7 +1673,7 @@ void CInputManager::releaseAllMouseButtons() {
if (PROTO::data->dndActive())
return;
- for (auto& mb : buttonsCopy) {
+ for (auto const& mb : buttonsCopy) {
g_pSeatManager->sendPointerButton(0, mb, WL_POINTER_BUTTON_STATE_RELEASED);
}