Michele Caini 7 лет назад
Родитель
Сommit
767bdcc2ce
2 измененных файлов с 2 добавлено и 5 удалено
  1. 0 1
      TODO
  2. 2 4
      src/entt/signal/sigh.hpp

+ 0 - 1
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

+ 2 - 4
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<typename Class>
-    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());
     }