diff options
author | Matheus Vinicius <matheusvinicius7000@gmail.com> | 2021-09-15 04:22:35 -0300 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-09-15 14:22:34 +0000 |
commit | 567104607c3bca6d2d7ca513317a5076c969b9ec (patch) | |
tree | dd2a424a1636ba0642e1a1ba012203d912fc1d83 | |
parent | ef3f9b24dd28ee32564fdcf50857161066dfaf0e (diff) | |
download | serenity-567104607c3bca6d2d7ca513317a5076c969b9ec.zip |
Breakout: Tag fallthrough statement
Tag key changes with fallthrough statement to document the intention.
-rw-r--r-- | Userland/Games/Breakout/Game.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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; |