diff --git a/Source/Core/Core/PatchEngine.cpp b/Source/Core/Core/PatchEngine.cpp index b1477aa8e5..fd26595eb8 100644 --- a/Source/Core/Core/PatchEngine.cpp +++ b/Source/Core/Core/PatchEngine.cpp @@ -48,7 +48,7 @@ constexpr std::array s_patch_type_strings{{ static std::vector s_on_frame; static std::vector s_on_frame_memory; static std::mutex s_on_frame_memory_mutex; -static std::map s_speed_hacks; +static std::map s_speed_hacks; const char* PatchTypeAsString(PatchType type) { @@ -192,13 +192,13 @@ static void LoadSpeedhacks(const std::string& section, Common::IniFile& ini) success &= TryParse(value, &cycles); if (success) { - s_speed_hacks[address] = static_cast(cycles); + s_speed_hacks[address] = cycles; } } } } -int GetSpeedhackCycles(const u32 addr) +u32 GetSpeedhackCycles(const u32 addr) { const auto iter = s_speed_hacks.find(addr); if (iter == s_speed_hacks.end()) diff --git a/Source/Core/Core/PatchEngine.h b/Source/Core/Core/PatchEngine.h index 95c379957a..128eda26c9 100644 --- a/Source/Core/Core/PatchEngine.h +++ b/Source/Core/Core/PatchEngine.h @@ -49,7 +49,7 @@ struct Patch const char* PatchTypeAsString(PatchType type); -int GetSpeedhackCycles(const u32 addr); +u32 GetSpeedhackCycles(const u32 addr); std::optional DeserializeLine(std::string line); std::string SerializeLine(const PatchEntry& entry); diff --git a/Source/Core/Core/PowerPC/JitCommon/JitBase.h b/Source/Core/Core/PowerPC/JitCommon/JitBase.h index cf0ce78dbc..273751cf37 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitBase.h +++ b/Source/Core/Core/PowerPC/JitCommon/JitBase.h @@ -93,7 +93,7 @@ protected: u32 blockStart; int instructionNumber; int instructionsLeft; - int downcountAmount; + u32 downcountAmount; u32 numLoadStoreInst; u32 numFloatingPointInst; // If this is set, we need to generate an exception handler for the fastmem load. diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp index 8029d06c2d..890e9975a4 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp @@ -38,7 +38,7 @@ void JitBlock::ProfileData::BeginProfiling(ProfileData* data) data->time_start = Clock::now(); } -void JitBlock::ProfileData::EndProfiling(ProfileData* data, int downcount_amount) +void JitBlock::ProfileData::EndProfiling(ProfileData* data, u32 downcount_amount) { data->cycles_spent += downcount_amount; data->time_spent += Clock::now() - data->time_start; diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.h b/Source/Core/Core/PowerPC/JitCommon/JitCache.h index d44cc097d3..15e8c99e43 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.h +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.h @@ -71,7 +71,7 @@ struct JitBlock : public JitBlockData using Clock = std::chrono::steady_clock; static void BeginProfiling(ProfileData* data); - static void EndProfiling(ProfileData* data, int downcount_amount); + static void EndProfiling(ProfileData* data, u32 downcount_amount); std::size_t run_count = 0; u64 cycles_spent = 0; diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.h b/Source/Core/Core/PowerPC/PPCAnalyst.h index 1bd25ae476..4e665d8d42 100644 --- a/Source/Core/Core/PowerPC/PPCAnalyst.h +++ b/Source/Core/Core/PowerPC/PPCAnalyst.h @@ -88,7 +88,7 @@ struct CodeOp // 16B struct BlockStats { - int numCycles; + u32 numCycles; }; struct BlockRegStats