From c8c805f720dab8d43a40ebabf52616d86ebae845 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Fri, 1 Oct 2010 12:38:31 +0000 Subject: [PATCH] Remove unnecessary shadow variables and signed/unsigned comparisons. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6244 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/NandPaths.cpp | 4 +++- Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp | 2 +- Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp | 2 +- Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp | 6 +++--- Source/Plugins/Plugin_VideoOGL/Src/Globals.h | 2 +- Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 7 +++---- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Source/Core/Common/Src/NandPaths.cpp b/Source/Core/Common/Src/NandPaths.cpp index 970b083e79..94772188b5 100644 --- a/Source/Core/Common/Src/NandPaths.cpp +++ b/Source/Core/Common/Src/NandPaths.cpp @@ -21,6 +21,7 @@ namespace Common { + std::string CreateTicketFileName(u64 _titleID) { char TicketFilename[1024]; @@ -85,4 +86,5 @@ bool CheckTitleTIK(u64 _titleID) INFO_LOG(DISCIO, "Invalid or no tik for title %08x %08x", (u32)(_titleID >> 32), (u32)(_titleID & 0xFFFFFFFF)); return false; } -}; \ No newline at end of file + +}; diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp index 99974085e3..8f09d6b556 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp @@ -500,7 +500,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc js.downcountAmount = 0; if (!Core::g_CoreStartupParameter.bEnableDebugging) { - for (unsigned int i = 0; i < size_of_merged_addresses; ++i) + for (int i = 0; i < size_of_merged_addresses; ++i) { const u32 address = merged_addresses[i]; js.downcountAmount += PatchEngine::GetSpeedhackCycles(address); diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp index d26b99c78e..cee9cc54c8 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp @@ -474,7 +474,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc js.downcountAmount = 0; if (!Core::g_CoreStartupParameter.bEnableDebugging) { - for (unsigned int i = 0; i < size_of_merged_addresses; ++i) + for (int i = 0; i < size_of_merged_addresses; ++i) { const u32 address = merged_addresses[i]; js.downcountAmount += PatchEngine::GetSpeedhackCycles(address); diff --git a/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp index a61917ebc7..d6671d2240 100644 --- a/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp +++ b/Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp @@ -361,10 +361,10 @@ u32 Flatten(u32 address, int *realsize, BlockStats *st, BlockRegStats *gpa, if (it != inserted_asm_codes.end()) { const std::vector& codes = it->second; - for (std::vector::const_iterator it = codes.begin(), - itEnd = codes.end(); it != itEnd; ++it) + for (std::vector::const_iterator itCur = codes.begin(), + itEnd = codes.end(); itCur != itEnd; ++itCur) { - cst1_instructions.push(*it); + cst1_instructions.push(*itCur); } inst = UGeckoInstruction(cst1_instructions.front()); cst1_instructions.pop(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h index 161b29fddf..e0d86e702a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h @@ -27,4 +27,4 @@ // A global plugin specification extern PLUGIN_GLOBALS* globals; -#endif // _GLOBALS_H_ \ No newline at end of file +#endif // _GLOBALS_H_ diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index ec0fb6d783..8b55b77a2c 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -94,7 +94,7 @@ static int s_MSAACoverageSamples = 0; bool s_bHaveFramebufferBlit = false; // export to FramebufferManager.cpp static bool s_bHaveCoverageMSAA = false; static u32 s_blendMode; -static u32 s_LastEFBScale; +static int s_LastEFBScale; static volatile bool s_bScreenshot = false; #if defined(HAVE_WX) && HAVE_WX @@ -951,8 +951,8 @@ void UpdateViewport() int scissorXOff = bpmem.scissorOffset.x * 2; int scissorYOff = bpmem.scissorOffset.y * 2; - int Xstride = (s_Fulltarget_width - s_target_width) / 2; - int Ystride = (s_Fulltarget_height - s_target_height) / 2; + // int Xstride = (s_Fulltarget_width - s_target_width) / 2; + // int Ystride = (s_Fulltarget_height - s_target_height) / 2; // Stretch picture with increased internal resolution int X = (int)ceil((xfregs.rawViewport[3] - xfregs.rawViewport[0] - float(scissorXOff)) * EFBxScale); @@ -1382,7 +1382,6 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons if (xfbchanged || WindowResized) { - TargetRectangle dst_rect; ComputeDrawRectangle(s_backbuffer_width, s_backbuffer_height, false, &dst_rect); if(g_ActiveConfig.bUseRealXFB)