From be50130c3f6951176206ae20282339b1cd259b45 Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Sat, 24 Jan 2015 21:50:26 +0200 Subject: [PATCH] Various fixes Fixes to dead code and a couple self-assignings --- Utilities/StrFmt.h | 6 ------ rpcs3/Emu/Cell/PPUThread.h | 3 +-- rpcs3/Emu/FS/vfsDirBase.h | 6 ++---- rpcs3/Emu/RSX/RSXTexture.cpp | 2 +- rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp | 7 +++---- rpcs3/Emu/SysCalls/Modules/cellSync.cpp | 2 -- rpcs3/Gui/CompilerELF.cpp | 6 +++--- 7 files changed, 10 insertions(+), 22 deletions(-) diff --git a/Utilities/StrFmt.h b/Utilities/StrFmt.h index 557a51ec4a..056861c122 100644 --- a/Utilities/StrFmt.h +++ b/Utilities/StrFmt.h @@ -338,8 +338,6 @@ namespace fmt { throw "Invalid formatting (s32): " + std::string(fmt, len); } - - return{}; } }; @@ -360,8 +358,6 @@ namespace fmt { throw "Invalid formatting (s64): " + std::string(fmt, len); } - - return{}; } }; @@ -448,8 +444,6 @@ namespace fmt { throw "Invalid formatting (const char*): " + std::string(fmt, len); } - - return{}; } }; diff --git a/rpcs3/Emu/Cell/PPUThread.h b/rpcs3/Emu/Cell/PPUThread.h index 2c5c13246d..fa7d6803f0 100644 --- a/rpcs3/Emu/Cell/PPUThread.h +++ b/rpcs3/Emu/Cell/PPUThread.h @@ -363,6 +363,7 @@ struct PPCdouble case _FPCLASS_PD: return FPR_PD; case _FPCLASS_PN: return FPR_PN; case _FPCLASS_PINF: return FPR_PINF; + default: throw fmt::Format("PPCdouble::UpdateType() -> unknown fpclass (0x%04x).", fpc); } #else switch (fpc) @@ -374,8 +375,6 @@ struct PPCdouble default: return std::signbit(_double) ? FPR_NN : FPR_PN; } #endif - - throw fmt::Format("PPCdouble::UpdateType() -> unknown fpclass (0x%04x).", fpc); } FPRType GetType() const diff --git a/rpcs3/Emu/FS/vfsDirBase.h b/rpcs3/Emu/FS/vfsDirBase.h index 0d05dcbaf5..84e4b0c342 100644 --- a/rpcs3/Emu/FS/vfsDirBase.h +++ b/rpcs3/Emu/FS/vfsDirBase.h @@ -62,14 +62,12 @@ public: public: iterator(vfsDirBase* parent) - : parent(parent) - , data(parent->First()) + : data(parent->First()) { } iterator(const DirEntryInfo* data) - : parent(parent) - , data(data) + : data(data) { } diff --git a/rpcs3/Emu/RSX/RSXTexture.cpp b/rpcs3/Emu/RSX/RSXTexture.cpp index 7a21e076d3..ce56142468 100644 --- a/rpcs3/Emu/RSX/RSXTexture.cpp +++ b/rpcs3/Emu/RSX/RSXTexture.cpp @@ -295,7 +295,7 @@ u8 RSXVertexTexture::GetWrapS() const u8 RSXVertexTexture::GetWrapT() const { return 1; - return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)] >> 8) & 0xf); + //return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)] >> 8) & 0xf); } u8 RSXVertexTexture::GetWrapR() const diff --git a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp index f91f4cb1c6..17bc0b1460 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp @@ -542,12 +542,11 @@ int cellGcmSetSecondVFrequency(u32 freq) switch (freq) { case CELL_GCM_DISPLAY_FREQUENCY_59_94HZ: - cellGcmSys->Todo("Unimplemented display frequency: 59.94Hz"); + cellGcmSys->Todo("Unimplemented display frequency: 59.94Hz"); break; case CELL_GCM_DISPLAY_FREQUENCY_SCANOUT: - cellGcmSys->Todo("Unimplemented display frequency: Scanout"); + cellGcmSys->Todo("Unimplemented display frequency: Scanout"); break; case CELL_GCM_DISPLAY_FREQUENCY_DISABLE: - Emu.GetGSManager().GetRender().m_frequency_mode = freq; - break; + Emu.GetGSManager().GetRender().m_frequency_mode = freq; break; default: return CELL_EINVAL; } diff --git a/rpcs3/Emu/SysCalls/Modules/cellSync.cpp b/rpcs3/Emu/SysCalls/Modules/cellSync.cpp index 0c372e82e8..17d8d18eef 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSync.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSync.cpp @@ -1062,7 +1062,6 @@ s32 syncLFQueueGetPushPointer(vm::ptr queue, s32& pointer, u32 { return res; } - break; } else if (!useEventQueue) { @@ -1439,7 +1438,6 @@ s32 syncLFQueueGetPopPointer(vm::ptr queue, s32& pointer, u32 i { return res; } - break; } else if (!useEventQueue) { diff --git a/rpcs3/Gui/CompilerELF.cpp b/rpcs3/Gui/CompilerELF.cpp index 0dcd836eca..d9979dbd70 100644 --- a/rpcs3/Gui/CompilerELF.cpp +++ b/rpcs3/Gui/CompilerELF.cpp @@ -210,7 +210,7 @@ void CompilerELF::OnUpdate(wxCommandEvent& event) DoAnalyzeCode(false); return; - asm_list->Freeze(); + /*asm_list->Freeze(); asm_list->SetStyle(0, asm_list->GetValue().Len(), wxTextAttr("Black")); /* @@ -220,7 +220,7 @@ void CompilerELF::OnUpdate(wxCommandEvent& event) } */ - SetOpStyle(".int", "Blue"); + /*SetOpStyle(".int", "Blue"); SetOpStyle(".string", "Blue"); SetOpStyle(".strlen", "Blue"); SetOpStyle(".buf", "Blue"); @@ -294,7 +294,7 @@ void CompilerELF::OnUpdate(wxCommandEvent& event) asm_list->Thaw(); - UpdateScroll(true, wxVERTICAL); + UpdateScroll(true, wxVERTICAL);*/ } void CompilerELF::OnScroll(wxScrollWinEvent& event)