File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,19 @@ auto ecsact::rt_entt_codegen::core::print_create_registry( //
17
17
18
18
ctx.write (" auto&& [registry_id, reg] = ecsact::entt::create_registry();\n\n " );
19
19
20
- ctx.write (
21
- " // These groups were automatically selected based on the input ecsact "
22
- " files\n "
23
- );
24
- for (auto sys_id : details.group_systems ) {
25
- auto cpp_decl_name = cpp_identifier (ecsact::meta::decl_full_name (sys_id));
26
- ctx.write (" ecsact::entt::prepare_system_like<" , cpp_decl_name, " >(reg);\n " );
20
+ if (!details.group_systems .empty ()) {
21
+ ctx.write (
22
+ " // These groups were automatically selected based on the input ecsact "
23
+ " files\n "
24
+ );
25
+ for (auto sys_id : details.group_systems ) {
26
+ auto cpp_decl_name = cpp_identifier (ecsact::meta::decl_full_name (sys_id));
27
+ ctx.write (
28
+ " ecsact::entt::prepare_system_like<" ,
29
+ cpp_decl_name,
30
+ " >(reg);\n "
31
+ );
32
+ }
27
33
}
28
34
29
35
ctx.write (" \n return registry_id;" );
You can’t perform that action at this time.
0 commit comments