mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 08:31:54 -07:00
core: make most for loops use const references (#7527)
why not let the compiler optimise things for us at hyprspeeds when we can.
This commit is contained in:
@@ -50,12 +50,12 @@ CDRMLeaseResource::CDRMLeaseResource(SP<CWpDrmLeaseV1> resource_, SP<CDRMLeaseRe
|
||||
|
||||
lease = aqlease;
|
||||
|
||||
for (auto& m : requested) {
|
||||
for (auto const& m : requested) {
|
||||
m->monitor->isBeingLeased = true;
|
||||
}
|
||||
|
||||
listeners.destroyLease = lease->events.destroy.registerListener([this](std::any d) {
|
||||
for (auto& m : requested) {
|
||||
for (auto const& m : requested) {
|
||||
if (m && m->monitor)
|
||||
m->monitor->isBeingLeased = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user