diff --git a/libs/ecs/include/psemek/ecs/dispatcher.hpp b/libs/ecs/include/psemek/ecs/dispatcher.hpp index c2b351f9..782dcde2 100644 --- a/libs/ecs/include/psemek/ecs/dispatcher.hpp +++ b/libs/ecs/include/psemek/ecs/dispatcher.hpp @@ -30,7 +30,7 @@ namespace psemek::ecs template void handler(Handler handler) { - handlers_[Event::uuid()].push_back([handler = std::move(handler), this](void const * event_ptr){ + handlers_[Event::uuid()].push_back([handler = std::move(handler), this](void const * event_ptr) mutable { auto const & event = *reinterpret_cast(event_ptr); if constexpr (std::invocable) @@ -47,7 +47,7 @@ namespace psemek::ecs template void system(System system) { - handlers_[Event::uuid()].push_back([system = std::move(system), this, cache = container_->cache()](void const * event_ptr){ + handlers_[Event::uuid()].push_back([system = std::move(system), this, cache = container_->cache()](void const * event_ptr) mutable { auto const & event = *reinterpret_cast(event_ptr); if constexpr (std::invocable)