diff options
| author | Kamikadze <40305144+Kam1k4dze@users.noreply.github.com> | 2025-05-30 18:25:59 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-30 14:25:59 +0100 |
| commit | 9190443d951c21ab24201d033accf90b4d172f46 (patch) | |
| tree | 28a5e4a1fa9c7424733ac7065a71cead7e141b6f /src/protocols/XDGShell.cpp | |
| parent | 9bf1b491440eac6f9c0d6853013ad5666c12d1d9 (diff) | |
refactor: use std::ranges whenever possible (#10584)
Diffstat (limited to 'src/protocols/XDGShell.cpp')
| -rw-r--r-- | src/protocols/XDGShell.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocols/XDGShell.cpp b/src/protocols/XDGShell.cpp index d3d5c18e..5351e267 100644 --- a/src/protocols/XDGShell.cpp +++ b/src/protocols/XDGShell.cpp @@ -258,7 +258,7 @@ uint32_t CXDGToplevelResource::setSize(const Vector2D& size) { } uint32_t CXDGToplevelResource::setMaximized(bool maximized) { - bool set = std::find(m_pendingApply.states.begin(), m_pendingApply.states.end(), XDG_TOPLEVEL_STATE_MAXIMIZED) != m_pendingApply.states.end(); + bool set = std::ranges::find(m_pendingApply.states, XDG_TOPLEVEL_STATE_MAXIMIZED) != m_pendingApply.states.end(); if (maximized == set) return m_owner->m_scheduledSerial; @@ -272,7 +272,7 @@ uint32_t CXDGToplevelResource::setMaximized(bool maximized) { } uint32_t CXDGToplevelResource::setFullscreen(bool fullscreen) { - bool set = std::find(m_pendingApply.states.begin(), m_pendingApply.states.end(), XDG_TOPLEVEL_STATE_FULLSCREEN) != m_pendingApply.states.end(); + bool set = std::ranges::find(m_pendingApply.states, XDG_TOPLEVEL_STATE_FULLSCREEN) != m_pendingApply.states.end(); if (fullscreen == set) return m_owner->m_scheduledSerial; @@ -286,7 +286,7 @@ uint32_t CXDGToplevelResource::setFullscreen(bool fullscreen) { } uint32_t CXDGToplevelResource::setActive(bool active) { - bool set = std::find(m_pendingApply.states.begin(), m_pendingApply.states.end(), XDG_TOPLEVEL_STATE_ACTIVATED) != m_pendingApply.states.end(); + bool set = std::ranges::find(m_pendingApply.states, XDG_TOPLEVEL_STATE_ACTIVATED) != m_pendingApply.states.end(); if (active == set) return m_owner->m_scheduledSerial; @@ -303,7 +303,7 @@ uint32_t CXDGToplevelResource::setSuspeneded(bool sus) { if (m_resource->version() < 6) return m_owner->scheduleConfigure(); // SUSPENDED is since 6 - bool set = std::find(m_pendingApply.states.begin(), m_pendingApply.states.end(), XDG_TOPLEVEL_STATE_SUSPENDED) != m_pendingApply.states.end(); + bool set = std::ranges::find(m_pendingApply.states, XDG_TOPLEVEL_STATE_SUSPENDED) != m_pendingApply.states.end(); if (sus == set) return m_owner->m_scheduledSerial; |
