From 8d6c18076f3268a6c85c6085d29f898267028101 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Mon, 26 Aug 2024 17:25:39 +0200 Subject: core: make most for loops use const references (#7527) why not let the compiler optimise things for us at hyprspeeds when we can. --- src/protocols/core/Seat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/protocols/core/Seat.cpp') diff --git a/src/protocols/core/Seat.cpp b/src/protocols/core/Seat.cpp index a111c12c..f7764389 100644 --- a/src/protocols/core/Seat.cpp +++ b/src/protocols/core/Seat.cpp @@ -172,7 +172,7 @@ void CWLPointerResource::sendLeave() { if (!PROTO::data->dndActive()) { timespec now; clock_gettime(CLOCK_MONOTONIC, &now); - for (auto& b : pressedButtons) { + for (auto const& b : pressedButtons) { sendButton(now.tv_sec * 1000 + now.tv_nsec / 1000000, b, WL_POINTER_BUTTON_STATE_RELEASED); } } -- cgit v1.2.3