X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fgame%2Feventsource.h;h=0856e08c452a7abd48b263db1bcb54092e4c75bb;hb=db01a6ed506ea2352b20f10b2694e249d2bba6c5;hp=5dacbeeed71603ec0418f3245a7fc82c39e449c5;hpb=8ec00c2260b0b2a0ac5259b9a7038fad669af04c;p=libs%2Fgame.git diff --git a/source/game/eventsource.h b/source/game/eventsource.h index 5dacbee..0856e08 100644 --- a/source/game/eventsource.h +++ b/source/game/eventsource.h @@ -44,6 +44,14 @@ public: }; +template +template +inline void EventSource::cancel_observation() +{ + for(const auto &h: static_cast &>(*this).handlers) + h.observer->remove_source(*this); +} + template template inline void EventSource::emit(Args &&... args) const @@ -53,14 +61,6 @@ inline void EventSource::emit(Args &&... args) const bus.dispatch(event); } -template -template -inline void EventSource::cancel_observation() -{ - for(const auto &h: static_cast &>(*this).handlers) - h.observer->remove_source(*this); -} - } // namespace Msp::Game #endif