]> git.tdb.fi Git - libs/game.git/blobdiff - source/game/eventsource.h
Cosmetic tweaks
[libs/game.git] / source / game / eventsource.h
index 5dacbeeed71603ec0418f3245a7fc82c39e449c5..0856e08c452a7abd48b263db1bcb54092e4c75bb 100644 (file)
@@ -44,6 +44,14 @@ public:
 };
 
 
+template<typename... E>
+template<typename T>
+inline void EventSource<E...>::cancel_observation()
+{
+       for(const auto &h: static_cast<EventDispatcher<T> &>(*this).handlers)
+               h.observer->remove_source(*this);
+}
+
 template<typename... E>
 template<typename T, typename... Args>
 inline void EventSource<E...>::emit(Args &&... args) const
@@ -53,14 +61,6 @@ inline void EventSource<E...>::emit(Args &&... args) const
        bus.dispatch(event);
 }
 
-template<typename... E>
-template<typename T>
-inline void EventSource<E...>::cancel_observation()
-{
-       for(const auto &h: static_cast<EventDispatcher<T> &>(*this).handlers)
-               h.observer->remove_source(*this);
-}
-
 } // namespace Msp::Game
 
 #endif