emitter: reintroduced type_id for the internal pool

This commit is contained in:
Michele Caini
2020-04-03 00:22:01 +02:00
parent 1e79f2441c
commit 08169b9180

View File

@@ -45,6 +45,7 @@ class emitter {
virtual ~basic_pool() = default;
virtual bool empty() const ENTT_NOEXCEPT = 0;
virtual void clear() ENTT_NOEXCEPT = 0;
virtual id_type type_id() const ENTT_NOEXCEPT = 0;
};
template<typename Event>
@@ -113,6 +114,10 @@ class emitter {
on_list.remove_if([](auto &&element) { return element.first; });
}
id_type type_id() const ENTT_NOEXCEPT override {
return type_info<Event>::id();
}
private:
bool publishing{false};
container_type once_list{};