Skip to content

Commit

Permalink
remove lambda from slot creation (#313)
Browse files Browse the repository at this point in the history
* remove lambda from slot creation
  • Loading branch information
magni-mar authored Dec 4, 2023
1 parent fac51a6 commit 9d550a9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions libs/ipc/inc/public/tfc/ipc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,8 @@ class slot {
std::string_view description,
tfc::stx::invocable<value_t> auto&& callback)
requires(!std::is_lvalue_reference_v<manager_client_type>)
: slot_{ details::slot_callback<type_desc>::create(
ctx,
name,
[this, callb = std::forward<decltype(callback)>(callback)](value_t const& new_value) {
callb(new_value);
dbus_slot_.emit_value(new_value);
}) },
dbus_slot_{ connection, full_name() }, client_{ connection },
: slot_{ details::slot_callback<type_desc>::create(ctx, name) }, dbus_slot_{ connection, full_name() },
client_{ connection },
filters_{ dbus_slot_.interface(),
// store the callers callback in this lambda
[this, callb = std::forward<decltype(callback)>(callback)](value_t const& new_value) {
Expand Down

0 comments on commit 9d550a9

Please sign in to comment.