diff --git a/src/emucore/CartEnhanced.cxx b/src/emucore/CartEnhanced.cxx index e24d5a5b7..22eb63ee7 100644 --- a/src/emucore/CartEnhanced.cxx +++ b/src/emucore/CartEnhanced.cxx @@ -93,7 +93,7 @@ void CartridgeEnhanced::install(System& system) // Set the page accessing method for the RAM writing pages // Note: Writes are mapped to poke() (NOT using direcPokeBase) to check for read from write port (RWP) access.type = System::PageAccessType::WRITE; - for(uInt16 addr = ROM_OFFSET + myWriteOffset; addr < ROM_OFFSET + myWriteOffset + myRamSize; addr += System::PAGE_SIZE) + for(size_t addr = ROM_OFFSET + myWriteOffset; addr < ROM_OFFSET + myWriteOffset + myRamSize; addr += System::PAGE_SIZE) { const uInt16 offset = addr & myRamMask; @@ -105,7 +105,7 @@ void CartridgeEnhanced::install(System& system) // Set the page accessing method for the RAM reading pages access.type = System::PageAccessType::READ; - for(uInt16 addr = ROM_OFFSET + myReadOffset; addr < ROM_OFFSET + myReadOffset + myRamSize; addr += System::PAGE_SIZE) + for(size_t addr = ROM_OFFSET + myReadOffset; addr < ROM_OFFSET + myReadOffset + myRamSize; addr += System::PAGE_SIZE) { const uInt16 offset = addr & myRamMask; diff --git a/src/gui/InputDialog.cxx b/src/gui/InputDialog.cxx index d5d847f1b..82dae982a 100644 --- a/src/gui/InputDialog.cxx +++ b/src/gui/InputDialog.cxx @@ -672,7 +672,8 @@ void InputDialog::handleCommand(CommandSender* sender, int cmd, break; case kPSpeedChanged: - myPaddleSpeed->setValueLabel(Paddles::setAnalogSensitivity(myPaddleSpeed->getValue()) * 100.F + 0.5F); + myPaddleSpeed->setValueLabel(std::round(Paddles::setAnalogSensitivity( + myPaddleSpeed->getValue()) * 100.F)); break; case kDejitterAvChanged: diff --git a/src/gui/VideoAudioDialog.cxx b/src/gui/VideoAudioDialog.cxx index 47c955b94..f68be6df8 100644 --- a/src/gui/VideoAudioDialog.cxx +++ b/src/gui/VideoAudioDialog.cxx @@ -631,7 +631,7 @@ void VideoAudioDialog::loadConfig() myVolumeSlider->setValue(audioSettings.volume()); // Device - uInt32 deviceId = BSPF::clamp(audioSettings.device(), 0u, + uInt32 deviceId = BSPF::clamp(audioSettings.device(), 0U, uInt32(instance().sound().supportedDevices().size() - 1)); myDevicePopup->setSelected(deviceId);