misc: constify the remaining for loops (#7534)

now we roll loops at blazing constified speed.
This commit is contained in:
Tom Englund
2024-08-26 20:24:30 +02:00
committed by GitHub
parent 1ea47950f4
commit 72c7818ae6
79 changed files with 472 additions and 472 deletions

View File

@@ -268,7 +268,7 @@ wl_client* CInputMethodV2::grabClient() {
if (grabs.empty())
return nullptr;
for (auto& gw : grabs) {
for (auto const& gw : grabs) {
auto g = gw.lock();
if (!g)
@@ -282,7 +282,7 @@ wl_client* CInputMethodV2::grabClient() {
void CInputMethodV2::sendInputRectangle(const CBox& box) {
inputRectangle = box;
for (auto& wp : popups) {
for (auto const& wp : popups) {
auto p = wp.lock();
if (!p)
@@ -293,7 +293,7 @@ void CInputMethodV2::sendInputRectangle(const CBox& box) {
}
void CInputMethodV2::sendKey(uint32_t time, uint32_t key, wl_keyboard_key_state state) {
for (auto& gw : grabs) {
for (auto const& gw : grabs) {
auto g = gw.lock();
if (!g)
@@ -304,7 +304,7 @@ void CInputMethodV2::sendKey(uint32_t time, uint32_t key, wl_keyboard_key_state
}
void CInputMethodV2::sendMods(uint32_t depressed, uint32_t latched, uint32_t locked, uint32_t group) {
for (auto& gw : grabs) {
for (auto const& gw : grabs) {
auto g = gw.lock();
if (!g)
@@ -315,7 +315,7 @@ void CInputMethodV2::sendMods(uint32_t depressed, uint32_t latched, uint32_t loc
}
void CInputMethodV2::setKeyboard(SP<IKeyboard> keyboard) {
for (auto& gw : grabs) {
for (auto const& gw : grabs) {
auto g = gw.lock();
if (!g)