File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ ecsact_build_recipe(
132
132
exports = [
133
133
# core
134
134
"ecsact_execute_systems" ,
135
+ "ecsact_create_registry" ,
135
136
"ecsact_destroy_registry" ,
136
137
"ecsact_clear_registry" ,
137
138
"ecsact_create_entity" ,
@@ -163,6 +164,8 @@ ecsact_build_recipe(
163
164
],
164
165
)
165
166
167
+ exports_files (["build_recipe.yml" ])
168
+
166
169
ecsact_build_recipe_bundle (
167
170
name = "ecsact_rt_entt" ,
168
171
recipes = [":ecsact_rt_entt_recipe" ],
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ inline auto get_component(
32
32
[[maybe_unused]] ecsact_component_id component_id,
33
33
...
34
34
) -> const void* {
35
+ if constexpr (std::is_empty_v<C>) {
36
+ static C emptyVal;
37
+ return &emptyVal;
38
+ }
35
39
auto & reg = ecsact::entt::get_registry (registry_id);
36
40
auto entity = ecsact::entt::entity_id{entity_id};
37
41
assert (C::id == component_id);
Original file line number Diff line number Diff line change @@ -195,19 +195,13 @@ void ecsact_codegen_plugin(
195
195
return ;
196
196
}
197
197
198
- auto non_tag_component_ids =
199
- details.all_components |
200
- std::views::filter ([&](ecsact_component_id comp_id) -> bool {
201
- return !ecsact::meta::get_field_ids (comp_id).empty ();
202
- });
203
-
204
198
ctx.write (
205
199
" result.reserve(" ,
206
- std::ranges::distance (non_tag_component_ids ),
200
+ std::ranges::distance (details. all_components ),
207
201
" );\n "
208
202
);
209
203
210
- for (auto comp_id : non_tag_component_ids ) {
204
+ for (auto comp_id : details. all_components ) {
211
205
auto cpp_comp_name = cpp_identifier (decl_full_name (comp_id));
212
206
ctx.write (
213
207
" result.insert({::" ,
You can’t perform that action at this time.
0 commit comments