From 567104607c3bca6d2d7ca513317a5076c969b9ec Mon Sep 17 00:00:00 2001 From: Matheus Vinicius Date: Wed, 15 Sep 2021 04:22:35 -0300 Subject: [PATCH] Breakout: Tag fallthrough statement Tag key changes with fallthrough statement to document the intention. --- Userland/Games/Breakout/Game.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Userland/Games/Breakout/Game.cpp b/Userland/Games/Breakout/Game.cpp index 972eba62f9..4ddd6b3342 100644 --- a/Userland/Games/Breakout/Game.cpp +++ b/Userland/Games/Breakout/Game.cpp @@ -153,10 +153,12 @@ void Game::keyup_event(GUI::KeyEvent& event) return; switch (event.key()) { case Key_A: + [[fallthrough]]; case Key_Left: m_paddle.moving_left = false; break; case Key_D: + [[fallthrough]]; case Key_Right: m_paddle.moving_right = false; break; @@ -174,10 +176,12 @@ void Game::keydown_event(GUI::KeyEvent& event) GUI::Application::the()->quit(); break; case Key_A: + [[fallthrough]]; case Key_Left: m_paddle.moving_left = true; break; case Key_D: + [[fallthrough]]; case Key_Right: m_paddle.moving_right = true; break;