From dbf1d4e213e21032f57b34e5fe7fb67b1dd578a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Fri, 18 Jun 2021 11:21:32 +0200 Subject: [PATCH] fixing warnings --- sources/Map/Map.cpp | 4 ++-- sources/Runner/MainMenuScene.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sources/Map/Map.cpp b/sources/Map/Map.cpp index b310c5ac..0fc9e4b7 100644 --- a/sources/Map/Map.cpp +++ b/sources/Map/Map.cpp @@ -33,8 +33,8 @@ namespace BBM entity.addComponent(position) .addComponent>() .addComponent() - .addComponent(1, [](WAL::Entity &entity, WAL::Wal &wal) { - entity.scheduleDeletion(); + .addComponent(1, [](WAL::Entity &myEntity, WAL::Wal &wal) { + myEntity.scheduleDeletion(); }) .addComponent(position.y) .addComponent([](WAL::Entity &bonus, const WAL::Entity &player, CollisionComponent::CollidedAxis axis) { diff --git a/sources/Runner/MainMenuScene.cpp b/sources/Runner/MainMenuScene.cpp index ab678654..3029e09a 100644 --- a/sources/Runner/MainMenuScene.cpp +++ b/sources/Runner/MainMenuScene.cpp @@ -72,20 +72,20 @@ namespace BBM .addComponent([](WAL::Entity &entity, WAL::Wal &) { gameState.nextScene = BBM::GameState::SceneID::ResumeLobbyScene; - auto scene = Runner::loadGameScene(); + auto gameScene = Runner::loadGameScene(); try { - ParserYAML::load(scene); + ParserYAML::load(gameScene); } catch (std::exception const &err) { Runner::gameState._loadedScenes[GameState::SceneID::LobbyScene]->addEntity("Error message parser") .addComponent(1920 / 5, 2 * 1080 / 4.25, 0) .addComponent(err.what(), 50, RAY::Vector2(), RED) - .addComponent(3s, [](WAL::Entity &entity, WAL::Wal &wal) { - entity.scheduleDeletion(); + .addComponent(3s, [](WAL::Entity &myEntity, WAL::Wal &wal) { + myEntity.scheduleDeletion(); }); gameState.nextScene = BBM::GameState::SceneID::LobbyScene; return; } - Runner::gameState._loadedScenes[GameState::SceneID::GameScene] = scene; + Runner::gameState._loadedScenes[GameState::SceneID::GameScene] = gameScene; }); auto &settings = scene->addEntity("settings button") .addComponent(1920 / 2.5, 1080 - 430, 0)