mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-10-14 14:05:59 +00:00
refactor: use std::ranges whenever possible (#10584)
This commit is contained in:
@@ -229,7 +229,7 @@ void CPointerConstraintsProtocol::onNewConstraint(SP<CPointerConstraint> constra
|
||||
|
||||
const auto OWNER = constraint->owner();
|
||||
|
||||
const auto DUPES = std::count_if(m_constraints.begin(), m_constraints.end(), [OWNER](const auto& c) { return c->owner() == OWNER; });
|
||||
const auto DUPES = std::ranges::count_if(m_constraints, [OWNER](const auto& c) { return c->owner() == OWNER; });
|
||||
|
||||
if UNLIKELY (DUPES > 1) {
|
||||
LOGM(ERR, "Constraint for surface duped");
|
||||
|
Reference in New Issue
Block a user