summaryrefslogtreecommitdiff
path: root/src/protocols/core/Seat.cpp
diff options
context:
space:
mode:
authorKamikadze <40305144+Kam1k4dze@users.noreply.github.com>2025-05-30 18:25:59 +0500
committerGitHub <noreply@github.com>2025-05-30 14:25:59 +0100
commit9190443d951c21ab24201d033accf90b4d172f46 (patch)
tree28a5e4a1fa9c7424733ac7065a71cead7e141b6f /src/protocols/core/Seat.cpp
parent9bf1b491440eac6f9c0d6853013ad5666c12d1d9 (diff)
refactor: use std::ranges whenever possible (#10584)
Diffstat (limited to 'src/protocols/core/Seat.cpp')
-rw-r--r--src/protocols/core/Seat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/protocols/core/Seat.cpp b/src/protocols/core/Seat.cpp
index bc224043..c341f95a 100644
--- a/src/protocols/core/Seat.cpp
+++ b/src/protocols/core/Seat.cpp
@@ -204,10 +204,10 @@ void CWLPointerResource::sendButton(uint32_t timeMs, uint32_t button, wl_pointer
if (!(PROTO::seat->m_currentCaps & eHIDCapabilityType::HID_INPUT_CAPABILITY_POINTER))
return;
- if (state == WL_POINTER_BUTTON_STATE_RELEASED && std::find(m_pressedButtons.begin(), m_pressedButtons.end(), button) == m_pressedButtons.end()) {
+ if (state == WL_POINTER_BUTTON_STATE_RELEASED && std::ranges::find(m_pressedButtons, button) == m_pressedButtons.end()) {
LOGM(ERR, "sendButton release on a non-pressed button");
return;
- } else if (state == WL_POINTER_BUTTON_STATE_PRESSED && std::find(m_pressedButtons.begin(), m_pressedButtons.end(), button) != m_pressedButtons.end()) {
+ } else if (state == WL_POINTER_BUTTON_STATE_PRESSED && std::ranges::find(m_pressedButtons, button) != m_pressedButtons.end()) {
LOGM(ERR, "sendButton press on a non-pressed button");
return;
}