From 0cb9b89d7d4c31466ae2dade66bb195ee9cd45fe Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sun, 7 May 2017 00:04:09 -0230 Subject: [PATCH] Fixed minor compile warnings in Visual Studio. --- src/debugger/gui/PaddleWidget.cxx | 20 ++++++++++---------- src/debugger/gui/RiotWidget.cxx | 2 ++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/debugger/gui/PaddleWidget.cxx b/src/debugger/gui/PaddleWidget.cxx index 301f183cd..e83abaccd 100644 --- a/src/debugger/gui/PaddleWidget.cxx +++ b/src/debugger/gui/PaddleWidget.cxx @@ -44,8 +44,8 @@ PaddleWidget::PaddleWidget(GuiObject* boss, const GUI::Font& font, new SliderWidget(boss, font, xpos, ypos, 10*fontWidth, lineHeight, p0string, lwidth, kP0Changed); myP0Resistance->setMinValue(0); - myP0Resistance->setMaxValue(Paddles::MAX_RESISTANCE); - myP0Resistance->setStepValue(Paddles::MAX_RESISTANCE/100); + myP0Resistance->setMaxValue(uInt32(Paddles::MAX_RESISTANCE)); + myP0Resistance->setStepValue(uInt32(Paddles::MAX_RESISTANCE/100)); myP0Resistance->setTarget(this); xpos += 20; ypos += myP0Resistance->getHeight() + 4; @@ -58,8 +58,8 @@ PaddleWidget::PaddleWidget(GuiObject* boss, const GUI::Font& font, new SliderWidget(boss, font, xpos, ypos, 10*fontWidth, lineHeight, p1string, lwidth, kP1Changed); myP1Resistance->setMinValue(0); - myP1Resistance->setMaxValue(Paddles::MAX_RESISTANCE); - myP1Resistance->setStepValue(Paddles::MAX_RESISTANCE/100); + myP1Resistance->setMaxValue(uInt32(Paddles::MAX_RESISTANCE)); + myP1Resistance->setStepValue(uInt32(Paddles::MAX_RESISTANCE/100)); myP1Resistance->setTarget(this); xpos += 20; ypos += myP1Resistance->getHeight() + 4; @@ -71,10 +71,10 @@ PaddleWidget::PaddleWidget(GuiObject* boss, const GUI::Font& font, // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void PaddleWidget::loadConfig() { - myP0Resistance->setValue(Paddles::MAX_RESISTANCE - - Int32(myController.read(Controller::Nine))); - myP1Resistance->setValue(Paddles::MAX_RESISTANCE - - Int32(myController.read(Controller::Five))); + myP0Resistance->setValue(Int32(Paddles::MAX_RESISTANCE - + myController.read(Controller::Nine))); + myP1Resistance->setValue(Int32(Paddles::MAX_RESISTANCE - + myController.read(Controller::Five))); myP0Fire->setState(!myController.read(Controller::Four)); myP1Fire->setState(!myController.read(Controller::Three)); } @@ -87,11 +87,11 @@ void PaddleWidget::handleCommand( { case kP0Changed: myController.set(Controller::Nine, - Paddles::MAX_RESISTANCE - myP0Resistance->getValue()); + Int32(Paddles::MAX_RESISTANCE - myP0Resistance->getValue())); break; case kP1Changed: myController.set(Controller::Five, - Paddles::MAX_RESISTANCE - myP1Resistance->getValue()); + Int32(Paddles::MAX_RESISTANCE - myP1Resistance->getValue())); break; case kP0Fire: myController.set(Controller::Four, !myP0Fire->getState()); diff --git a/src/debugger/gui/RiotWidget.cxx b/src/debugger/gui/RiotWidget.cxx index d35e6fbfa..5adb3ab17 100644 --- a/src/debugger/gui/RiotWidget.cxx +++ b/src/debugger/gui/RiotWidget.cxx @@ -464,6 +464,8 @@ ControllerWidget* RiotWidget::addControlWidget(GuiObject* boss, const GUI::Font& return new SaveKeyWidget(boss, font, x, y, controller); case Controller::TrakBall: // TODO - implement this return new NullControlWidget(boss, font, x, y, controller); + default: + return nullptr; // make compiler happy } }