Skip to content

Commit 9d550a9

Browse files
authored
remove lambda from slot creation (#313)
* remove lambda from slot creation
1 parent fac51a6 commit 9d550a9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

libs/ipc/inc/public/tfc/ipc.hpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,8 @@ class slot {
7979
std::string_view description,
8080
tfc::stx::invocable<value_t> auto&& callback)
8181
requires(!std::is_lvalue_reference_v<manager_client_type>)
82-
: slot_{ details::slot_callback<type_desc>::create(
83-
ctx,
84-
name,
85-
[this, callb = std::forward<decltype(callback)>(callback)](value_t const& new_value) {
86-
callb(new_value);
87-
dbus_slot_.emit_value(new_value);
88-
}) },
89-
dbus_slot_{ connection, full_name() }, client_{ connection },
82+
: slot_{ details::slot_callback<type_desc>::create(ctx, name) }, dbus_slot_{ connection, full_name() },
83+
client_{ connection },
9084
filters_{ dbus_slot_.interface(),
9185
// store the callers callback in this lambda
9286
[this, callb = std::forward<decltype(callback)>(callback)](value_t const& new_value) {

0 commit comments

Comments
 (0)