From 5fd8cec7ea961559a4e5c6b66420a55144c60a76 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 13 May 2018 15:17:38 -0400 Subject: [PATCH] PatchEngine: Add s_ prefix to file-scope variables Brings the translation unit in line with the convention used elsewhere in the codebase. --- Source/Core/Core/PatchEngine.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Source/Core/Core/PatchEngine.cpp b/Source/Core/Core/PatchEngine.cpp index a272bd0f0c..f1ab5432bd 100644 --- a/Source/Core/Core/PatchEngine.cpp +++ b/Source/Core/Core/PatchEngine.cpp @@ -34,8 +34,8 @@ constexpr std::array s_patch_type_strings{{ "dword", }}; -static std::vector onFrame; -static std::map speedHacks; +static std::vector s_on_frame; +static std::map s_speed_hacks; const char* PatchTypeAsString(PatchType type) { @@ -141,7 +141,7 @@ static void LoadSpeedhacks(const std::string& section, IniFile& ini) success &= TryParse(value, &cycles); if (success) { - speedHacks[address] = (int)cycles; + s_speed_hacks[address] = static_cast(cycles); } } } @@ -149,11 +149,11 @@ static void LoadSpeedhacks(const std::string& section, IniFile& ini) int GetSpeedhackCycles(const u32 addr) { - std::map::const_iterator iter = speedHacks.find(addr); - if (iter == speedHacks.end()) + const auto iter = s_speed_hacks.find(addr); + if (iter == s_speed_hacks.end()) return 0; - else - return iter->second; + + return iter->second; } void LoadPatches() @@ -162,7 +162,7 @@ void LoadPatches() IniFile globalIni = SConfig::GetInstance().LoadDefaultGameIni(); IniFile localIni = SConfig::GetInstance().LoadLocalGameIni(); - LoadPatchSection("OnFrame", onFrame, globalIni, localIni); + LoadPatchSection("OnFrame", s_on_frame, globalIni, localIni); ActionReplay::LoadAndApplyCodes(globalIni, localIni); Gecko::SetActiveCodes(Gecko::LoadCodes(globalIni, localIni)); @@ -238,7 +238,7 @@ bool ApplyFramePatches() return false; } - ApplyPatches(onFrame); + ApplyPatches(s_on_frame); // Run the Gecko code handler Gecko::RunCodeHandler(); @@ -249,8 +249,8 @@ bool ApplyFramePatches() void Shutdown() { - onFrame.clear(); - speedHacks.clear(); + s_on_frame.clear(); + s_speed_hacks.clear(); ActionReplay::ApplyCodes({}); Gecko::Shutdown(); }