diff --git a/libsrc/core/signal.hpp b/libsrc/core/signal.hpp index bd9cd6f0..a994f48c 100644 --- a/libsrc/core/signal.hpp +++ b/libsrc/core/signal.hpp @@ -51,19 +51,22 @@ namespace ngcore class SimpleSignal { private: - std::map> funcs; + // std::map> funcs; + std::list>> funcs; public: SimpleSignal() = default; template void Connect(void* var, FUNC f) { - funcs[var] = f; + // funcs[var] = f; + funcs.push_back ( { var, f } ); } void Remove(void* var) { - funcs.erase(var); + // funcs.erase(var); + funcs.remove_if([&] (auto var_f) { return var_f.first==var; }); } inline void Emit()