Skip to content

Commit 02f96d9

Browse files
authored
fix: add missing return type in context.remove (#200)
1 parent 551f476 commit 02f96d9

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

cpp_systems_header_codegen/cpp_systems_header_codegen.cc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,14 @@ static void write_context_add_specialize(
301301
cpp_full_name
302302
),
303303
[&] {
304-
ctx.write(std::format("_ctx.add<{}>(new_component)", cpp_full_name));
304+
ctx.write(std::format("_ctx.add<{}>(new_component);", cpp_full_name));
305305
}
306306
);
307307
} else {
308308
block(
309309
ctx,
310310
std::format("template<> auto add<{}>() -> void", cpp_full_name),
311-
[&] { ctx.write(std::format("_ctx.add<{}>()", cpp_full_name)); }
311+
[&] { ctx.write(std::format("_ctx.add<{}>();", cpp_full_name)); }
312312
);
313313
}
314314

@@ -346,9 +346,13 @@ static auto write_context_remove_specialize(
346346
auto full_name = ecsact_meta_decl_full_name(decl_id);
347347
auto cpp_full_name = cpp_identifier(full_name);
348348

349-
block(ctx, std::format("template<> auto remove<{}>()", cpp_full_name), [&] {
350-
ctx.write(std::format("return _ctx.remove<{}>();\n", cpp_full_name));
351-
});
349+
block(
350+
ctx,
351+
std::format("template<> auto remove<{}>() -> void", cpp_full_name),
352+
[&] {
353+
ctx.write(std::format("return _ctx.remove<{}>();\n", cpp_full_name));
354+
}
355+
);
352356

353357
ctx.write("\n");
354358
}

0 commit comments

Comments
 (0)