diff --git a/src/wx/cmdevents.cpp b/src/wx/cmdevents.cpp index 6bc7123f..c31b83df 100644 --- a/src/wx/cmdevents.cpp +++ b/src/wx/cmdevents.cpp @@ -126,7 +126,7 @@ static void toggleBitVar(bool *menuValue, int *globalVar, int mask) EVT_HANDLER(wxID_OPEN, "Open ROM...") { static int open_ft = 0; - const wxString& gba_rom_dir = OPTION(kGBAROMDir); + const wxString gba_rom_dir = OPTION(kGBAROMDir); // FIXME: ignore if non-existent or not a dir wxString pats = _( @@ -158,7 +158,7 @@ EVT_HANDLER(wxID_OPEN, "Open ROM...") EVT_HANDLER(OpenGB, "Open GB...") { static int open_ft = 0; - const wxString& gb_rom_dir = OPTION(kGBROMDir); + const wxString gb_rom_dir = OPTION(kGBROMDir); // FIXME: ignore if non-existent or not a dir wxString pats = _( @@ -185,7 +185,7 @@ EVT_HANDLER(OpenGB, "Open GB...") EVT_HANDLER(OpenGBC, "Open GBC...") { static int open_ft = 0; - const wxString& gbc_rom_dir = OPTION(kGBGBCROMDir); + const wxString gbc_rom_dir = OPTION(kGBGBCROMDir); // FIXME: ignore if non-existent or not a dir wxString pats = _( diff --git a/src/wx/dialogs/display-config.cpp b/src/wx/dialogs/display-config.cpp index c8453b8c..75cdf558 100644 --- a/src/wx/dialogs/display-config.cpp +++ b/src/wx/dialogs/display-config.cpp @@ -330,7 +330,7 @@ void DisplayConfig::PopulatePluginOptions() { plugin_selector_->Clear(); plugin_selector_->Append(_("None"), new wxStringClientData()); - const wxString& selected_plugin = OPTION(kDispFilterPlugin); + const wxString selected_plugin = OPTION(kDispFilterPlugin); bool is_plugin_selected = false; for (const wxString& plugin : plugins) { diff --git a/src/wx/dialogs/speedup-config.cpp b/src/wx/dialogs/speedup-config.cpp index 92d5c3de..c7706781 100644 --- a/src/wx/dialogs/speedup-config.cpp +++ b/src/wx/dialogs/speedup-config.cpp @@ -56,11 +56,8 @@ bool SpeedupConfigValidator::TransferToWindow() { bool SpeedupConfigValidator::TransferFromWindow() { auto dialog = static_cast(GetWindow()); - uint32_t val = dialog->speedup_throttle_spin_->GetValue(); - VBAM_CHECK(val >= 0); - if (val == 0) { OPTION(kPrefSpeedupThrottle) = 0; OPTION(kPrefSpeedupFrameSkip) = 0; @@ -116,11 +113,8 @@ SpeedupConfig::SpeedupConfig(wxWindow* parent) void SpeedupConfig::SetSpeedupThrottle(wxCommandEvent& evt) { VBAM_CHECK(evt.GetEventObject() == speedup_throttle_spin_); - uint32_t val = speedup_throttle_spin_->GetValue(); - VBAM_CHECK(val >= 0); - if (val == 0) { frame_skip_cb_->SetValue(false); frame_skip_cb_->Disable(); diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index bb9e7874..29d7f7b3 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -189,19 +189,19 @@ void GameArea::LoadGame(const wxString& name) wxString rp = fnfn.GetPath(); // can't really decide which dir to use, so try GBA first, then GB - const wxString& gba_rom_dir = OPTION(kGBAROMDir); + const wxString gba_rom_dir = OPTION(kGBAROMDir); if (!wxGetApp().GetAbsolutePath(gba_rom_dir).empty()) { fnfn.SetPath(wxGetApp().GetAbsolutePath(gba_rom_dir) + '/' + rp); badfile = !fnfn.IsFileReadable(); } - const wxString& gb_rom_dir = OPTION(kGBROMDir); + const wxString gb_rom_dir = OPTION(kGBROMDir); if (badfile && !wxGetApp().GetAbsolutePath(gb_rom_dir).empty()) { fnfn.SetPath(wxGetApp().GetAbsolutePath(gb_rom_dir) + '/' + rp); badfile = !fnfn.IsFileReadable(); } - const wxString& gbc_rom_dir = OPTION(kGBGBCROMDir); + const wxString gbc_rom_dir = OPTION(kGBGBCROMDir); if (badfile && !wxGetApp().GetAbsolutePath(gbc_rom_dir).empty()) { fnfn.SetPath(wxGetApp().GetAbsolutePath(gbc_rom_dir) + '/' + rp); badfile = !fnfn.IsFileReadable();