From 6cd2f1521a83e1e328768038f612a02703ff1bfe Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Mon, 1 Apr 2019 11:44:00 -0230 Subject: [PATCH] Silence some compiler warnings - Some of these are quite unncessary, but the compiler won't shut up otherwise. --- src/gui/GameInfoDialog.cxx | 9 ++++++--- src/gui/StellaSettingsDialog.cxx | 6 ++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/gui/GameInfoDialog.cxx b/src/gui/GameInfoDialog.cxx index ecc2560c9..128d23240 100644 --- a/src/gui/GameInfoDialog.cxx +++ b/src/gui/GameInfoDialog.cxx @@ -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); diff --git a/src/gui/StellaSettingsDialog.cxx b/src/gui/StellaSettingsDialog.cxx index e75714fb9..c8a12ec6c 100644 --- a/src/gui/StellaSettingsDialog.cxx +++ b/src/gui/StellaSettingsDialog.cxx @@ -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;