mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-08 16:11:57 -07:00
misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
This commit is contained in:
@@ -38,7 +38,7 @@ void CTearingControlProtocol::onControllerDestroy(CTearingControl* control) {
|
||||
}
|
||||
|
||||
void CTearingControlProtocol::onWindowDestroy(PHLWINDOW pWindow) {
|
||||
for (auto& c : m_vTearingControllers) {
|
||||
for (auto const& c : m_vTearingControllers) {
|
||||
if (c->pWindow.lock() == pWindow)
|
||||
c->pWindow.reset();
|
||||
}
|
||||
@@ -52,7 +52,7 @@ CTearingControl::CTearingControl(SP<CWpTearingControlV1> resource_, SP<CWLSurfac
|
||||
resource->setDestroy([this](CWpTearingControlV1* res) { PROTO::tearing->onControllerDestroy(this); });
|
||||
resource->setSetPresentationHint([this](CWpTearingControlV1* res, wpTearingControlV1PresentationHint hint) { this->onHint(hint); });
|
||||
|
||||
for (auto& w : g_pCompositor->m_vWindows) {
|
||||
for (auto const& w : g_pCompositor->m_vWindows) {
|
||||
if (w->m_pWLSurface->resource() == surf_) {
|
||||
pWindow = w;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user