mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 08:31:54 -07:00
misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
This commit is contained in:
@@ -369,7 +369,7 @@ void CToplevelExportProtocol::onOutputCommit(CMonitor* pMonitor) {
|
||||
std::vector<WP<CToplevelExportFrame>> framesToRemove;
|
||||
|
||||
// share frame if correct output
|
||||
for (auto& f : m_vFramesAwaitingWrite) {
|
||||
for (auto const& f : m_vFramesAwaitingWrite) {
|
||||
if (!f->pWindow || !validMapped(f->pWindow)) {
|
||||
framesToRemove.push_back(f);
|
||||
continue;
|
||||
@@ -393,13 +393,13 @@ void CToplevelExportProtocol::onOutputCommit(CMonitor* pMonitor) {
|
||||
framesToRemove.push_back(f);
|
||||
}
|
||||
|
||||
for (auto& f : framesToRemove) {
|
||||
for (auto const& f : framesToRemove) {
|
||||
destroyResource(f.get());
|
||||
}
|
||||
}
|
||||
|
||||
void CToplevelExportProtocol::onWindowUnmap(PHLWINDOW pWindow) {
|
||||
for (auto& f : m_vFrames) {
|
||||
for (auto const& f : m_vFrames) {
|
||||
if (f->pWindow == pWindow)
|
||||
f->pWindow.reset();
|
||||
}
|
||||
|
Reference in New Issue
Block a user