diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2023-02-02 14:59:25 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2023-02-09 16:23:01 -0800 |
| commit | 49a84cbc4c1318b2290688c5e798dcc63c0bf910 (patch) | |
| tree | 91f808f6d89a3025322dd9c830095910d55b9963 /Source/Core/Common | |
| parent | 2288ba28ae75f8236bac41ffec6e14c0548cad41 (diff) | |
Resolve various "no previous declaration" warnings
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Debug/CodeTrace.cpp | 30 | ||||
| -rw-r--r-- | Source/Core/Common/FatFsUtil.cpp | 4 |
2 files changed, 19 insertions, 15 deletions
diff --git a/Source/Core/Common/Debug/CodeTrace.cpp b/Source/Core/Common/Debug/CodeTrace.cpp index 09939bdf96..65b7826770 100644 --- a/Source/Core/Common/Debug/CodeTrace.cpp +++ b/Source/Core/Common/Debug/CodeTrace.cpp @@ -48,6 +48,21 @@ u32 GetMemoryTargetSize(std::string_view instr) return 4; } + +bool CompareMemoryTargetToTracked(const std::string& instr, const u32 mem_target, + const std::set<u32>& mem_tracked) +{ + // This function is hit often and should be optimized. + auto it_lower = std::lower_bound(mem_tracked.begin(), mem_tracked.end(), mem_target); + + if (it_lower == mem_tracked.end()) + return false; + else if (*it_lower == mem_target) + return true; + + // If the base value doesn't hit, still need to check if longer values overlap. + return *it_lower < mem_target + GetMemoryTargetSize(instr); +} } // namespace void CodeTrace::SetRegTracked(const std::string& reg) @@ -124,21 +139,6 @@ TraceOutput CodeTrace::SaveCurrentInstruction() const return output; } -bool CompareMemoryTargetToTracked(const std::string& instr, const u32 mem_target, - const std::set<u32>& mem_tracked) -{ - // This function is hit often and should be optimized. - auto it_lower = std::lower_bound(mem_tracked.begin(), mem_tracked.end(), mem_target); - - if (it_lower == mem_tracked.end()) - return false; - else if (*it_lower == mem_target) - return true; - - // If the base value doesn't hit, still need to check if longer values overlap. - return *it_lower < mem_target + GetMemoryTargetSize(instr); -} - AutoStepResults CodeTrace::AutoStepping(bool continue_previous, AutoStop stop_on) { AutoStepResults results; diff --git a/Source/Core/Common/FatFsUtil.cpp b/Source/Core/Common/FatFsUtil.cpp index b003e48f5b..c03e16e4a6 100644 --- a/Source/Core/Common/FatFsUtil.cpp +++ b/Source/Core/Common/FatFsUtil.cpp @@ -195,6 +195,7 @@ extern "C" DWORD get_fattime(void) return static_cast<DWORD>(s_callbacks->GetCurrentTimeFAT()); } +#if FF_USE_LFN == 3 // match ff.h; currently unused by Dolphin extern "C" void* ff_memalloc(UINT msize) { return std::malloc(msize); @@ -204,7 +205,9 @@ extern "C" void ff_memfree(void* mblock) { return std::free(mblock); } +#endif +#if FF_FS_REENTRANT extern "C" int ff_cre_syncobj(BYTE vol, FF_SYNC_t* sobj) { *sobj = new std::recursive_mutex(); @@ -229,6 +232,7 @@ extern "C" int ff_del_syncobj(FF_SYNC_t sobj) delete reinterpret_cast<std::recursive_mutex*>(sobj); return 1; } +#endif static const char* FatFsErrorToString(FRESULT error_code) { |
