mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-09-14 07:18:23 +00:00
misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user