diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2024-08-26 20:24:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-26 20:24:30 +0200 |
| commit | 72c7818ae66a18d126e2b4245d649fe3a93d3b8e (patch) | |
| tree | 194361ee0d4f92eea809b7904d39f02793c55e13 /src/managers/input/InputMethodRelay.cpp | |
| parent | 1ea47950f4262ec1215087948c7275f8e0115af2 (diff) | |
misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
Diffstat (limited to 'src/managers/input/InputMethodRelay.cpp')
| -rw-r--r-- | src/managers/input/InputMethodRelay.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp index 7cfd54b4..1608e123 100644 --- a/src/managers/input/InputMethodRelay.cpp +++ b/src/managers/input/InputMethodRelay.cpp @@ -57,7 +57,7 @@ void CInputMethodRelay::onNewIME(SP<CInputMethodV2> pIME) { if (!g_pCompositor->m_pLastFocus) return; - for (auto& ti : m_vTextInputs) { + for (auto const& ti : m_vTextInputs) { if (ti->client() != g_pCompositor->m_pLastFocus->client()) continue; @@ -80,7 +80,7 @@ CTextInput* CInputMethodRelay::getFocusedTextInput() { if (!g_pCompositor->m_pLastFocus) return nullptr; - for (auto& ti : m_vTextInputs) { + for (auto const& ti : m_vTextInputs) { if (ti->focusedSurface() == g_pCompositor->m_pLastFocus) return ti.get(); } @@ -101,7 +101,7 @@ void CInputMethodRelay::removeTextInput(CTextInput* pInput) { } void CInputMethodRelay::updateAllPopups() { - for (auto& p : m_vIMEPopups) { + for (auto const& p : m_vIMEPopups) { p->onCommit(); } } @@ -138,7 +138,7 @@ void CInputMethodRelay::onKeyboardFocus(SP<CWLSurfaceResource> pSurface) { m_pLastKbFocus = pSurface; - for (auto& ti : m_vTextInputs) { + for (auto const& ti : m_vTextInputs) { if (!ti->focusedSurface()) continue; @@ -148,7 +148,7 @@ void CInputMethodRelay::onKeyboardFocus(SP<CWLSurfaceResource> pSurface) { if (!pSurface) return; - for (auto& ti : m_vTextInputs) { + for (auto const& ti : m_vTextInputs) { if (!ti->isV3()) continue; @@ -160,7 +160,7 @@ void CInputMethodRelay::onKeyboardFocus(SP<CWLSurfaceResource> pSurface) { } CInputPopup* CInputMethodRelay::popupFromCoords(const Vector2D& point) { - for (auto& p : m_vIMEPopups) { + for (auto const& p : m_vIMEPopups) { if (p->isVecInPopup(point)) return p.get(); } @@ -169,7 +169,7 @@ CInputPopup* CInputMethodRelay::popupFromCoords(const Vector2D& point) { } CInputPopup* CInputMethodRelay::popupFromSurface(const SP<CWLSurfaceResource> surface) { - for (auto& p : m_vIMEPopups) { + for (auto const& p : m_vIMEPopups) { if (p->getSurface() == surface) return p.get(); } |
