From c01180b74cc111db70753b29c90ce9016b187c8f Mon Sep 17 00:00:00 2001 From: ancarola Date: Sun, 27 Jan 2019 01:13:55 +0100 Subject: Small fix T& -> T* --- engine/include/core/signal.hpp | 2 +- test/signal_test.cpp | 2 +- test/task_test.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/include/core/signal.hpp b/engine/include/core/signal.hpp index 606d61a..e21b73e 100644 --- a/engine/include/core/signal.hpp +++ b/engine/include/core/signal.hpp @@ -124,7 +124,7 @@ namespace flat const std::initializer_list& filters = {}); template - inline listener::ptr connect(R T::*mf, T& obj, + inline listener::ptr connect(R T::*mf, T* obj, const std::initializer_list& filters = {}) { using namespace std::placeholders; diff --git a/test/signal_test.cpp b/test/signal_test.cpp index 76ab35b..4dcb635 100644 --- a/test/signal_test.cpp +++ b/test/signal_test.cpp @@ -44,7 +44,7 @@ public: c_listener(channel::ptr chan) { - lis = chan->connect(&c_listener::method_listener, *this); + lis = chan->connect(&c_listener::method_listener, this); } void method_listener(const object *o, signal::package msg) diff --git a/test/task_test.cpp b/test/task_test.cpp index 04bb23d..1db5098 100644 --- a/test/task_test.cpp +++ b/test/task_test.cpp @@ -16,7 +16,7 @@ private: public: message(job& job) { // add an example job - mytask = job.delegate_task(&message::print_motd, *this); + mytask = job.delegate_task(&message::print_motd, this); } void print_date() { -- cgit v1.2.1