|
@@ -72,8 +72,8 @@ class basic_registry {
|
|
|
decltype(auto) assign(basic_registry ®istry, const Entity entt, Args &&... args) {
|
|
decltype(auto) assign(basic_registry ®istry, const Entity entt, Args &&... args) {
|
|
|
if constexpr(std::is_empty_v<Component>) {
|
|
if constexpr(std::is_empty_v<Component>) {
|
|
|
storage<Entity, Component>::construct(entt);
|
|
storage<Entity, Component>::construct(entt);
|
|
|
- construction.publish(entt, registry, Component{std::forward<Args>(args)...});
|
|
|
|
|
- return Component{};
|
|
|
|
|
|
|
+ construction.publish(entt, registry, Component{});
|
|
|
|
|
+ return Component{std::forward<Args>(args)...};
|
|
|
} else {
|
|
} else {
|
|
|
auto &component = storage<Entity, Component>::construct(entt, std::forward<Args>(args)...);
|
|
auto &component = storage<Entity, Component>::construct(entt, std::forward<Args>(args)...);
|
|
|
construction.publish(entt, registry, component);
|
|
construction.publish(entt, registry, component);
|