From f603a22af0c8890b9742d761d44f0b595740f5b1 Mon Sep 17 00:00:00 2001 From: Honkazel <169346573+Honkazel@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:12:41 +0500 Subject: [PATCH] internal: Remove some unused lambda captures (#8218) --- src/devices/Tablet.cpp | 2 +- src/managers/TokenManager.cpp | 4 ++-- src/managers/input/InputManager.cpp | 2 +- src/protocols/DataDeviceWlr.cpp | 4 ++-- src/protocols/PrimarySelection.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/devices/Tablet.cpp b/src/devices/Tablet.cpp index 71ca899121d..99e436fb3af 100644 --- a/src/devices/Tablet.cpp +++ b/src/devices/Tablet.cpp @@ -197,7 +197,7 @@ CTabletPad::CTabletPad(SP pad_) : pad(pad_) { }); }); - listeners.attach = pad->events.attach.registerListener([this](std::any d) { + listeners.attach = pad->events.attach.registerListener([](std::any d) { ; // TODO: this doesn't do anything in aq atm }); diff --git a/src/managers/TokenManager.cpp b/src/managers/TokenManager.cpp index cee97c1c2ad..5efa2eb8805 100644 --- a/src/managers/TokenManager.cpp +++ b/src/managers/TokenManager.cpp @@ -34,7 +34,7 @@ SP CTokenManager::getToken(const std::string& uuid) { // cleanup expired tokens const auto NOW = std::chrono::steady_clock::now(); - std::erase_if(m_mTokens, [this, &NOW](const auto& el) { return el.second->expiresAt < NOW; }); + std::erase_if(m_mTokens, [&NOW](const auto& el) { return el.second->expiresAt < NOW; }); if (!m_mTokens.contains(uuid)) return {}; @@ -46,4 +46,4 @@ void CTokenManager::removeToken(SP token) { if (!token) return; m_mTokens.erase(token->uuid); -} \ No newline at end of file +} diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 196f0b714d3..6f7d8017063 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -905,7 +905,7 @@ void CInputManager::setupKeyboard(SP keeb) { keeb.get()); keeb->keyboardEvents.keymap.registerStaticListener( - [this](void* owner, std::any data) { + [](void* owner, std::any data) { auto PKEEB = ((IKeyboard*)owner)->self.lock(); const auto LAYOUT = PKEEB->getActiveLayout(); diff --git a/src/protocols/DataDeviceWlr.cpp b/src/protocols/DataDeviceWlr.cpp index 69e287726b6..baf0a29984f 100644 --- a/src/protocols/DataDeviceWlr.cpp +++ b/src/protocols/DataDeviceWlr.cpp @@ -112,7 +112,7 @@ CWLRDataDevice::CWLRDataDevice(SP resource_) : resourc resource->setDestroy([this](CZwlrDataControlDeviceV1* r) { PROTO::dataWlr->destroyResource(this); }); resource->setOnDestroy([this](CZwlrDataControlDeviceV1* r) { PROTO::dataWlr->destroyResource(this); }); - resource->setSetSelection([this](CZwlrDataControlDeviceV1* r, wl_resource* sourceR) { + resource->setSetSelection([](CZwlrDataControlDeviceV1* r, wl_resource* sourceR) { auto source = sourceR ? CWLRDataSource::fromResource(sourceR) : CSharedPointer{}; if (!source) { LOGM(LOG, "wlr reset selection received"); @@ -129,7 +129,7 @@ CWLRDataDevice::CWLRDataDevice(SP resource_) : resourc g_pSeatManager->setCurrentSelection(source); }); - resource->setSetPrimarySelection([this](CZwlrDataControlDeviceV1* r, wl_resource* sourceR) { + resource->setSetPrimarySelection([](CZwlrDataControlDeviceV1* r, wl_resource* sourceR) { auto source = sourceR ? CWLRDataSource::fromResource(sourceR) : CSharedPointer{}; if (!source) { LOGM(LOG, "wlr reset primary selection received"); diff --git a/src/protocols/PrimarySelection.cpp b/src/protocols/PrimarySelection.cpp index f1db2d655fb..7602a46621e 100644 --- a/src/protocols/PrimarySelection.cpp +++ b/src/protocols/PrimarySelection.cpp @@ -113,7 +113,7 @@ CPrimarySelectionDevice::CPrimarySelectionDevice(SPsetDestroy([this](CZwpPrimarySelectionDeviceV1* r) { PROTO::primarySelection->destroyResource(this); }); resource->setOnDestroy([this](CZwpPrimarySelectionDeviceV1* r) { PROTO::primarySelection->destroyResource(this); }); - resource->setSetSelection([this](CZwpPrimarySelectionDeviceV1* r, wl_resource* sourceR, uint32_t serial) { + resource->setSetSelection([](CZwpPrimarySelectionDeviceV1* r, wl_resource* sourceR, uint32_t serial) { static auto PPRIMARYSEL = CConfigValue("misc:middle_click_paste"); if (!*PPRIMARYSEL) {