Skip to content

Commit

Permalink
internal: Remove some unused lambda captures (#8218)
Browse files Browse the repository at this point in the history
  • Loading branch information
Honkazel authored Oct 24, 2024
1 parent cdac649 commit f603a22
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/devices/Tablet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ CTabletPad::CTabletPad(SP<Aquamarine::ITabletPad> 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
});

Expand Down
4 changes: 2 additions & 2 deletions src/managers/TokenManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SP<CUUIDToken> 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 {};
Expand All @@ -46,4 +46,4 @@ void CTokenManager::removeToken(SP<CUUIDToken> token) {
if (!token)
return;
m_mTokens.erase(token->uuid);
}
}
2 changes: 1 addition & 1 deletion src/managers/input/InputManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ void CInputManager::setupKeyboard(SP<IKeyboard> 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();

Expand Down
4 changes: 2 additions & 2 deletions src/protocols/DataDeviceWlr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ CWLRDataDevice::CWLRDataDevice(SP<CZwlrDataControlDeviceV1> 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<CWLRDataSource>{};
if (!source) {
LOGM(LOG, "wlr reset selection received");
Expand All @@ -129,7 +129,7 @@ CWLRDataDevice::CWLRDataDevice(SP<CZwlrDataControlDeviceV1> 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<CWLRDataSource>{};
if (!source) {
LOGM(LOG, "wlr reset primary selection received");
Expand Down
2 changes: 1 addition & 1 deletion src/protocols/PrimarySelection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ CPrimarySelectionDevice::CPrimarySelectionDevice(SP<CZwpPrimarySelectionDeviceV1
resource->setDestroy([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<Hyprlang::INT>("misc:middle_click_paste");

if (!*PPRIMARYSEL) {
Expand Down

0 comments on commit f603a22

Please sign in to comment.