Skip to content

Commit 6914f28

Browse files
committed
refactor: remove unnecessary 'this' pointer in lambda functions for system registration
1 parent ce444ac commit 6914f28

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Flakkari/Server/Game/Game.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,10 @@ void Game::loadSystems(Engine::ECS::Registry &registry, const std::string &name)
7474
[this](Engine::ECS::Registry &r) { Engine::ECS::Systems::_3D::apply_movable(r, _deltaTime); });
7575

7676
else if (name == "spawn_random_within_skybox")
77-
registry.add_system(
78-
[this](Engine::ECS::Registry &r) { Engine::ECS::Systems::_3D::spawn_random_within_skybox(r); });
77+
registry.add_system([](Engine::ECS::Registry &r) { Engine::ECS::Systems::_3D::spawn_random_within_skybox(r); });
7978

8079
else if (name == "handle_collisions")
81-
registry.add_system([this](Engine::ECS::Registry &r) { Engine::ECS::Systems::_3D::handle_collisions(r); });
80+
registry.add_system([](Engine::ECS::Registry &r) { Engine::ECS::Systems::_3D::handle_collisions(r); });
8281
}
8382

8483
void Game::loadComponents(Engine::ECS::Registry &registry, const nl_component &components,

0 commit comments

Comments
 (0)