diff options
| author | 2019-10-06 13:51:31 -0400 | |
|---|---|---|
| committer | 2019-10-06 13:53:12 -0400 | |
| commit | f1382cf0e7180cd31505ee89e774cc93bde6211e (patch) | |
| tree | c732e422a882f0e40e42094533546b32e61d56c2 /src/core/memory.cpp | |
| parent | hle/service: Replace global system instance calls with instance-based ones (diff) | |
| download | yuzu-f1382cf0e7180cd31505ee89e774cc93bde6211e.tar.gz yuzu-f1382cf0e7180cd31505ee89e774cc93bde6211e.tar.xz yuzu-f1382cf0e7180cd31505ee89e774cc93bde6211e.zip | |
core: Remove Core::CurrentProcess()
This only encourages the use of the global system instance (which will
be phased out long-term). Instead, we use the direct system function
call directly to remove the appealing but discouraged short-hand.
Diffstat (limited to 'src/core/memory.cpp')
| -rw-r--r-- | src/core/memory.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 9e030789d..fa49f3dd0 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp | |||
| @@ -146,7 +146,7 @@ static u8* GetPointerFromVMA(const Kernel::Process& process, VAddr vaddr) { | |||
| 146 | * using a VMA from the current process. | 146 | * using a VMA from the current process. |
| 147 | */ | 147 | */ |
| 148 | static u8* GetPointerFromVMA(VAddr vaddr) { | 148 | static u8* GetPointerFromVMA(VAddr vaddr) { |
| 149 | return GetPointerFromVMA(*Core::CurrentProcess(), vaddr); | 149 | return GetPointerFromVMA(*Core::System::GetInstance().CurrentProcess(), vaddr); |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | template <typename T> | 152 | template <typename T> |
| @@ -226,7 +226,7 @@ bool IsValidVirtualAddress(const Kernel::Process& process, const VAddr vaddr) { | |||
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | bool IsValidVirtualAddress(const VAddr vaddr) { | 228 | bool IsValidVirtualAddress(const VAddr vaddr) { |
| 229 | return IsValidVirtualAddress(*Core::CurrentProcess(), vaddr); | 229 | return IsValidVirtualAddress(*Core::System::GetInstance().CurrentProcess(), vaddr); |
| 230 | } | 230 | } |
| 231 | 231 | ||
| 232 | bool IsKernelVirtualAddress(const VAddr vaddr) { | 232 | bool IsKernelVirtualAddress(const VAddr vaddr) { |
| @@ -387,7 +387,7 @@ void ReadBlock(const Kernel::Process& process, const VAddr src_addr, void* dest_ | |||
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | void ReadBlock(const VAddr src_addr, void* dest_buffer, const std::size_t size) { | 389 | void ReadBlock(const VAddr src_addr, void* dest_buffer, const std::size_t size) { |
| 390 | ReadBlock(*Core::CurrentProcess(), src_addr, dest_buffer, size); | 390 | ReadBlock(*Core::System::GetInstance().CurrentProcess(), src_addr, dest_buffer, size); |
| 391 | } | 391 | } |
| 392 | 392 | ||
| 393 | void Write8(const VAddr addr, const u8 data) { | 393 | void Write8(const VAddr addr, const u8 data) { |
| @@ -450,7 +450,7 @@ void WriteBlock(const Kernel::Process& process, const VAddr dest_addr, const voi | |||
| 450 | } | 450 | } |
| 451 | 451 | ||
| 452 | void WriteBlock(const VAddr dest_addr, const void* src_buffer, const std::size_t size) { | 452 | void WriteBlock(const VAddr dest_addr, const void* src_buffer, const std::size_t size) { |
| 453 | WriteBlock(*Core::CurrentProcess(), dest_addr, src_buffer, size); | 453 | WriteBlock(*Core::System::GetInstance().CurrentProcess(), dest_addr, src_buffer, size); |
| 454 | } | 454 | } |
| 455 | 455 | ||
| 456 | void ZeroBlock(const Kernel::Process& process, const VAddr dest_addr, const std::size_t size) { | 456 | void ZeroBlock(const Kernel::Process& process, const VAddr dest_addr, const std::size_t size) { |
| @@ -539,7 +539,7 @@ void CopyBlock(const Kernel::Process& process, VAddr dest_addr, VAddr src_addr, | |||
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | void CopyBlock(VAddr dest_addr, VAddr src_addr, std::size_t size) { | 541 | void CopyBlock(VAddr dest_addr, VAddr src_addr, std::size_t size) { |
| 542 | CopyBlock(*Core::CurrentProcess(), dest_addr, src_addr, size); | 542 | CopyBlock(*Core::System::GetInstance().CurrentProcess(), dest_addr, src_addr, size); |
| 543 | } | 543 | } |
| 544 | 544 | ||
| 545 | } // namespace Memory | 545 | } // namespace Memory |