]> git.tdb.fi Git - libs/game.git/blobdiff - source/game/eventbus.h
Use template lambdas to avoid repetition of types
[libs/game.git] / source / game / eventbus.h
index e09663589c8c99fe02180db76b94fbe6506af54b..c78cb0d6562bfec062317b6915510daa08916f56 100644 (file)
@@ -23,7 +23,7 @@ struct EventDispatcher
        { 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;
 };