instance-less pools for empty components

This commit is contained in:
Michele Caini
2019-05-09 00:09:04 +02:00
parent 3a3a5dc071
commit 150b83b4f3
11 changed files with 402 additions and 367 deletions

View File

@@ -368,7 +368,7 @@ TEST(Mod, Duktape) {
ASSERT_EQ(registry.view<position>().size(), 3u);
ASSERT_EQ(registry.view<renderable>().size(), 2u);
registry.view<duktape_runtime>().each([](auto, const duktape_runtime &runtime) {
registry.view<duktape_runtime>().each([](const duktape_runtime &runtime) {
ASSERT_EQ(runtime.components.size(), 2u);
});
@@ -387,7 +387,7 @@ TEST(Mod, Duktape) {
ASSERT_EQ(registry.view<position>().size(), 3u);
ASSERT_EQ(registry.view<renderable>().size(), 2u);
registry.view<position, renderable, duktape_runtime>().each([](auto, const position &position, const auto &...) {
registry.view<position, renderable, duktape_runtime>().each([](const position &position, auto &&...) {
ASSERT_EQ(position.x, -100.);
ASSERT_EQ(position.y, -100.);
});