diff options
author | Bastien Bouclet | 2017-08-06 17:53:57 +0200 |
---|---|---|
committer | Bastien Bouclet | 2017-08-06 17:55:33 +0200 |
commit | f5b335af100c84d2ad761548825548d6fe3be125 (patch) | |
tree | 09bc90ef40d55492989fb48ab9102548dbe8bbad /gui/console.cpp | |
parent | 8e5ac98a4b6082caf68ad205dc6cadffa4df5051 (diff) | |
download | scummvm-rg350-f5b335af100c84d2ad761548825548d6fe3be125.tar.gz scummvm-rg350-f5b335af100c84d2ad761548825548d6fe3be125.tar.bz2 scummvm-rg350-f5b335af100c84d2ad761548825548d6fe3be125.zip |
GUI: Mark some fall-through cases as intentional
Comments explain how the num lock handling works before the
fall-through cases.
Diffstat (limited to 'gui/console.cpp')
-rw-r--r-- | gui/console.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gui/console.cpp b/gui/console.cpp index 4cdad41f5f..27b38ac78b 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -353,6 +353,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_DELETE: if (_currentPos < _promptEndPos) { killChar(); @@ -365,6 +366,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_END: if (state.hasFlags(Common::KBD_SHIFT)) { _scrollLine = _promptEndPos / kCharsPerLine; @@ -382,6 +384,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_DOWN: historyScroll(-1); break; @@ -391,6 +394,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_PAGEDOWN: if (state.hasFlags(Common::KBD_SHIFT)) { _scrollLine += _linesPerPage - 1; @@ -409,6 +413,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_LEFT: if (_currentPos > _promptStartPos) _currentPos--; @@ -420,6 +425,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_RIGHT: if (_currentPos < _promptEndPos) _currentPos++; @@ -431,6 +437,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_HOME: if (state.hasFlags(Common::KBD_SHIFT)) { _scrollLine = _firstLineInBuffer + _linesPerPage - 1; @@ -446,6 +453,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_UP: historyScroll(+1); break; @@ -455,6 +463,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { defaultKeyDownHandler(state); break; } + // fall through case Common::KEYCODE_PAGEUP: if (state.hasFlags(Common::KBD_SHIFT)) { _scrollLine -= _linesPerPage - 1; |