{ handlers.emplace_back(obs, std::move(cb)); }
void remove_observer(EventObserver *obs)
- { std::erase_if(handlers, [obs](const Handler &h){ return h.observer==obs; }); }
+ { std::erase_if(handlers, [obs](auto &h){ return h.observer==obs; }); }
void dispatch(const T &) const;
};
System(s),
observer(s.get_event_bus())
{
- observer.observe<Events::EntityCreated>([this](const Events::EntityCreated &){ transforms_dirty = true; });
- observer.observe<Events::EntityDestroyed>([this](const Events::EntityDestroyed &){ transforms_dirty = true; });
+ observer.observe<Events::EntityCreated>([this](auto &){ transforms_dirty = true; });
+ observer.observe<Events::EntityDestroyed>([this](auto &){ transforms_dirty = true; });
}
void TransformPropagator::tick(Time::TimeDelta)