mirror of https://github.com/stella-emu/stella.git
Fixed compile warnings under clang:
- multiline IF statements should have braces - override keyword not being used when overriding virtual methods
This commit is contained in:
parent
46f2ae0cab
commit
1fa3f0cf0d
|
@ -556,15 +556,19 @@ void GameInfoDialog::updateControllerStates(int cmd)
|
|||
|
||||
// make sure the CompuMate is always selected for both controllers
|
||||
if(cmd == kLeftCChanged)
|
||||
{
|
||||
if(contrP0 == "COMPUMATE")
|
||||
myP1Controller->setSelected("COMPUMATE");
|
||||
else if(contrP1 == "COMPUMATE")
|
||||
myP1Controller->setSelected(contrP0);
|
||||
}
|
||||
if(cmd == kRightCChanged)
|
||||
{
|
||||
if(contrP1 == "COMPUMATE")
|
||||
myP0Controller->setSelected("COMPUMATE");
|
||||
else if(contrP0 == "COMPUMATE")
|
||||
myP0Controller->setSelected(contrP1);
|
||||
}
|
||||
|
||||
enableSwapPorts = myP0Controller->getSelectedTag().toString() != "COMPUMATE";
|
||||
enableSwapPaddles = string::npos != contrP0.find("PADDLES")
|
||||
|
|
|
@ -42,8 +42,8 @@ class PopUpWidget : public Widget, public CommandSender
|
|||
const string& label, int labelWidth = 0, int cmd = 0);
|
||||
virtual ~PopUpWidget() = default;
|
||||
|
||||
int getTop() const { return _y + 1; }
|
||||
int getBottom() const { return _y + 1 + getHeight(); }
|
||||
int getTop() const override { return _y + 1; }
|
||||
int getBottom() const override { return _y + 1 + getHeight(); }
|
||||
|
||||
/** Add the given items to the widget. */
|
||||
void addItems(const VariantList& items) { myMenu->addItems(items); }
|
||||
|
|
Loading…
Reference in New Issue