Silence some compiler warnings

- Some of these are quite unncessary, but the compiler won't shut up otherwise.
This commit is contained in:
Stephen Anthony 2019-04-01 11:44:00 -02:30
parent ff65426954
commit 6cd2f1521a
2 changed files with 8 additions and 7 deletions

View File

@ -617,10 +617,13 @@ void GameInfoDialog::updateControllerStates()
enableSwapPaddles |= BSPF::equalsIgnoreCase(instance().console().rightController().name(), "Paddles");
// we only enable the button if we have a valid previous and new controller.
enableEEEraseButton = ((contrLeft == "AUTO" || contrLeft == "SAVEKEY" || contrLeft == "ATARIVOX") &&
(lport.type() == Controller::Type::SaveKey || lport.type() == Controller::Type::AtariVox) ||
bool enableBtnForLeft =
(contrLeft == "AUTO" || contrLeft == "SAVEKEY" || contrLeft == "ATARIVOX") &&
(lport.type() == Controller::Type::SaveKey || lport.type() == Controller::Type::AtariVox);
bool enableBtnForRight =
(contrRight == "AUTO" || contrRight == "SAVEKEY" || contrRight == "ATARIVOX") &&
(rport.type() == Controller::Type::SaveKey || rport.type() == Controller::Type::AtariVox));
(rport.type() == Controller::Type::SaveKey || rport.type() == Controller::Type::AtariVox);
enableEEEraseButton = enableBtnForLeft || enableBtnForRight;
}
myLeftPortLabel->setEnabled(enableSelectControl);

View File

@ -73,8 +73,7 @@ StellaSettingsDialog::StellaSettingsDialog(OSystem& osystem, DialogContainer& pa
void StellaSettingsDialog::addUIOptions(WidgetArray& wid, int& xpos, int& ypos, const GUI::Font& font)
{
const int VGAP = 4;
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth();
const int lineHeight = font.getLineHeight();
VariantList items;
int pwidth = font.getStringWidth("Bad adjust");
@ -148,8 +147,7 @@ void StellaSettingsDialog::addVideoOptions(WidgetArray& wid, int& xpos, int& ypo
void StellaSettingsDialog::addGameOptions(WidgetArray& wid, int& xpos, int& ypos, const GUI::Font& font)
{
const int VGAP = 4;
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth();
const int lineHeight = font.getLineHeight();
const GUI::Font& ifont = instance().frameBuffer().infoFont();
VariantList ctrls;