diff options
| -rw-r--r-- | gui/ThemeEngine.cpp | 7 | ||||
| -rw-r--r-- | gui/console.cpp | 12 | ||||
| -rw-r--r-- | gui/debugger.cpp | 2 | ||||
| -rw-r--r-- | gui/dialog.cpp | 2 | ||||
| -rw-r--r-- | gui/launcher.cpp | 2 | ||||
| -rw-r--r-- | gui/onscreendialog.cpp | 2 | ||||
| -rw-r--r-- | gui/options.cpp | 2 | ||||
| -rw-r--r-- | gui/predictivedialog.cpp | 2 | ||||
| -rw-r--r-- | gui/saveload-dialog.cpp | 3 | ||||
| -rw-r--r-- | gui/saveload.cpp | 2 | ||||
| -rw-r--r-- | gui/unknown-game-dialog.cpp | 2 | ||||
| -rw-r--r-- | gui/widget.cpp | 2 | ||||
| -rw-r--r-- | gui/widgets/list.cpp | 2 | ||||
| -rw-r--r-- | gui/widgets/scrollcontainer.cpp | 2 | ||||
| -rw-r--r-- | gui/widgets/tab.cpp | 3 | 
15 files changed, 43 insertions, 4 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index dd074ccef3..666b9b3d8a 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -1082,6 +1082,9 @@ void ThemeEngine::drawDialogBackground(const Common::Rect &r, DialogBackground b  	case kDialogBackgroundDefault:  		drawDD(kDDDefaultBackground, r);  		break; + +	default: +		// fallthrough intended  	case kDialogBackgroundNone:  		// no op  		break; @@ -1209,6 +1212,8 @@ void ThemeEngine::drawText(const Common::Rect &r, const Common::String &str, Wid  				colorId = kTextColorNormalHover;  				break; +			default: +				// fallthrough intended  			case kStateEnabled:  			case kStatePressed:  				colorId = kTextColorNormal; @@ -1230,6 +1235,8 @@ void ThemeEngine::drawText(const Common::Rect &r, const Common::String &str, Wid  				colorId = kTextColorAlternativeHover;  				break; +			default: +				// fallthrough intended  			case kStateEnabled:  			case kStatePressed:  				colorId = kTextColorAlternative; diff --git a/gui/console.cpp b/gui/console.cpp index a47f5b9afd..41b7a73379 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -489,12 +489,16 @@ void ConsoleDialog::insertIntoPrompt(const char* str) {  void ConsoleDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {  	switch (cmd) {  	case kSetPositionCmd: -		int newPos = (int)data + _linesPerPage - 1 + _firstLineInBuffer; -		if (newPos != _scrollLine) { -			_scrollLine = newPos; -			g_gui.scheduleTopDialogRedraw(); +		{ +			int newPos = (int)data + _linesPerPage - 1 + _firstLineInBuffer; +			if (newPos != _scrollLine) { +				_scrollLine = newPos; +				g_gui.scheduleTopDialogRedraw(); +			}  		}  		break; +	default: +		break;  	}  } diff --git a/gui/debugger.cpp b/gui/debugger.cpp index 2e8ae1ca01..ea8a699ac0 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -403,6 +403,8 @@ void Debugger::splitCommand(Common::String &input, int &argc, const char **argv)  		c = (byte)*p;  		switch (state) { +		default: +			// fallthrough intended  		case DULL:  			// not in a word, not in a double quoted string  			if (isspace(c)) diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 781de330e2..99441e0841 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -353,6 +353,8 @@ void Dialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {  	case kCloseCmd:  		close();  		break; +	default: +		break;  	}  } diff --git a/gui/launcher.cpp b/gui/launcher.cpp index b09f650fc9..ac414e0fa1 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -454,6 +454,8 @@ void LauncherDialog::recordGame(int item) {  	MessageDialog alert(_("Do you want to load saved game?"),  		_("Yes"), _("No"));  	switch(recorderDialog.runModal(_domains[item])) { +	default: +		// fallthrough intended  	case RecorderDialog::kRecordDialogClose:  		break;  	case RecorderDialog::kRecordDialogPlayback: diff --git a/gui/onscreendialog.cpp b/gui/onscreendialog.cpp index 8b338f56df..7d348d720d 100644 --- a/gui/onscreendialog.cpp +++ b/gui/onscreendialog.cpp @@ -153,6 +153,8 @@ void OnScreenDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat  	case kFastModeCmd:  		g_eventRec.switchFastMode();  		break; +	default: +		break;  	}  } diff --git a/gui/options.cpp b/gui/options.cpp index 8548cc99a4..772f94686b 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -2350,6 +2350,8 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3  		case Cloud::kStorageBoxId:  			url += "box";  			break; +		default: +			break;  		}  		if (!g_system->openUrl(url)) { diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp index b01e4950d5..b15bd5c97a 100644 --- a/gui/predictivedialog.cpp +++ b/gui/predictivedialog.cpp @@ -532,6 +532,8 @@ void PredictiveDialog::processButton(ButtonId button) {  						_temp[x] = buttons[_currentCode[x] - '1'][_repeatcount[x]];  				_temp[_currentCode.size()] = 0;  				_currentWord = _temp; +			default: +				break;  			}  		} else if (button == kNextAct) { // next  			if (_mode == kModePre) { diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index d0132d91ef..61fd392976 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -84,6 +84,9 @@ void SaveLoadCloudSyncProgressDialog::handleCommand(CommandSender *sender, uint3  	case kBackgroundSyncCmd:  		_close = true;  		break; + +	default: +		break;  	}  	Dialog::handleCommand(sender, cmd, data); diff --git a/gui/saveload.cpp b/gui/saveload.cpp index a893f3c0db..6de8be97d8 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -51,6 +51,8 @@ void SaveLoadChooser::selectChooser(const MetaEngine &engine) {  			_impl = new SaveLoadChooserGrid(_title, _saveMode);  			break; +		default: +			// fallthrough intended  		case kSaveLoadDialogList:  #endif // !DISABLE_SAVELOADCHOOSER_GRID  			_impl = new SaveLoadChooserSimple(_title, _buttonLabel, _saveMode); diff --git a/gui/unknown-game-dialog.cpp b/gui/unknown-game-dialog.cpp index 0aa8cc5750..790f724948 100644 --- a/gui/unknown-game-dialog.cpp +++ b/gui/unknown-game-dialog.cpp @@ -232,6 +232,8 @@ void UnknownGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32  		for (uint i = 0; i < _textWidgets.size() ; i++)  			_textWidgets[i]->setVisible(true);  		break; +	default: +		break;  	}  } diff --git a/gui/widget.cpp b/gui/widget.cpp index f870eb52dc..3e372828e1 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -237,6 +237,8 @@ uint8 Widget::parseHotkey(const Common::String &label) {  			else  				state = 0;  			break; +		default: +			break;  		}  	} diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp index cc5ea91745..3ef365ba5c 100644 --- a/gui/widgets/list.cpp +++ b/gui/widgets/list.cpp @@ -516,6 +516,8 @@ void ListWidget::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {  			((GUI::Dialog *)_boss)->setFocusWidget(this);  		}  		break; +	default: +		break;  	}  } diff --git a/gui/widgets/scrollcontainer.cpp b/gui/widgets/scrollcontainer.cpp index 389eed05c3..c136c57a81 100644 --- a/gui/widgets/scrollcontainer.cpp +++ b/gui/widgets/scrollcontainer.cpp @@ -111,6 +111,8 @@ void ScrollContainerWidget::handleCommand(CommandSender *sender, uint32 cmd, uin  		reflowLayout();  		g_gui.scheduleTopDialogRedraw();  		break; +	default: +		break;  	}  } diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp index 8c136ba467..0305b57061 100644 --- a/gui/widgets/tab.cpp +++ b/gui/widgets/tab.cpp @@ -195,6 +195,9 @@ void TabWidget::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {  			setFirstVisible(_firstVisibleTab + 1, false);  		}  		break; + +	default: +		break;  	}  }  | 
