From 767bdcc2ceab8b7e668fcc841cdf831340c5a0d1 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Sun, 28 Oct 2018 14:24:56 +0100 Subject: [PATCH] minor changes --- TODO | 1 - src/entt/signal/sigh.hpp | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 93af4103d..4fbb6432f 100644 --- a/TODO +++ b/TODO @@ -19,4 +19,3 @@ * add a note about multithreading support to the README file * signals on entity creation/destruction * flexible views with "composable" filters -* sigh/sink: disconnect doesn't really require the Class type, void * is enough diff --git a/src/entt/signal/sigh.hpp b/src/entt/signal/sigh.hpp index 14aa43d31..7afde0217 100644 --- a/src/entt/signal/sigh.hpp +++ b/src/entt/signal/sigh.hpp @@ -213,11 +213,9 @@ public: /** * @brief Removes all existing connections for the given instance. - * @tparam Class Type of class to which the member function belongs. - * @param instance A valid instance of type pointer to `Class`. + * @param instance An instance to be disconnected from the signal. */ - template - void disconnect(Class *instance) { + void disconnect(const void *instance) { auto func = [instance](const auto &delegate) { return delegate.instance() == instance; }; calls->erase(std::remove_if(calls->begin(), calls->end(), std::move(func)), calls->end()); }