Fix unused caches in ecs::dispatcher

This commit is contained in:
Nikita Lisitsa 2024-06-02 15:48:04 +03:00
parent 91c2dbca67
commit 7279a5b6f5

View file

@ -52,25 +52,25 @@ namespace psemek::ecs
{
container_->apply<Components...>([&](ecs::container & container, ecs::handle handle, Components & ... components){
system(event, container, handle, components...);
});
}, cache);
}
else if constexpr (std::invocable<System, Event const &, ecs::container &, Components & ...>)
{
container_->apply<Components...>([&](ecs::container & container, Components & ... components){
system(event, container, components...);
});
}, cache);
}
else if constexpr (std::invocable<System, Event const &, handle, Components & ...>)
{
container_->apply<Components...>([&](ecs::handle handle, Components & ... components){
system(event, handle, components...);
});
}, cache);
}
else
{
container_->apply<Components...>([&](Components & ... components){
system(event, components...);
});
}, cache);
}
});
}