From ebed3ee8f1115658e07fdf03e99c9b8c952b8a33 Mon Sep 17 00:00:00 2001 From: Patricia Aas Date: Tue, 5 Oct 2021 14:48:26 +0200 Subject: [PATCH] Fix Clang Tidy warning --- lib/Game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Game.cpp b/lib/Game.cpp index 7eab191..da5eadd 100644 --- a/lib/Game.cpp +++ b/lib/Game.cpp @@ -37,7 +37,7 @@ void Game::processEvents(InputState & inputState) { return; } - if (event && event.value().type == sf::Event::KeyPressed && event.value().key.code == sf::Keyboard::A) { + if (sf::Keyboard::isKeyPressed(sf::Keyboard::A)) { inputState.enableAI = !inputState.enableAI; }