From 1cb34ea0d31e16a1d58ceda82f3480d62aa414ad Mon Sep 17 00:00:00 2001 From: SachinVin Date: Sun, 9 Jul 2023 16:37:28 +0530 Subject: [PATCH] core/memory.*:constify `GetPhysicalPointer`; audio_core\hle\source.h: constify `memory_system` --- src/audio_core/hle/source.h | 2 +- src/core/memory.cpp | 2 +- src/core/memory.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/audio_core/hle/source.h b/src/audio_core/hle/source.h index 3addb66550..0e5d9869ae 100644 --- a/src/audio_core/hle/source.h +++ b/src/audio_core/hle/source.h @@ -66,7 +66,7 @@ public: private: const std::size_t source_id; - Memory::MemorySystem* memory_system; + const Memory::MemorySystem* memory_system{}; StereoFrame16 current_frame; using Format = SourceConfiguration::Configuration::Format; diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 3b1c6ba93a..3bef55322b 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -643,7 +643,7 @@ std::string MemorySystem::ReadCString(VAddr vaddr, std::size_t max_length) { return string; } -u8* MemorySystem::GetPhysicalPointer(PAddr address) { +u8* MemorySystem::GetPhysicalPointer(PAddr address) const { return GetPhysicalRef(address); } diff --git a/src/core/memory.h b/src/core/memory.h index eac9fb374e..56ae6f2b8d 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -576,7 +576,7 @@ public: void RasterizerMarkRegionCached(PAddr start, u32 size, bool cached); /// Gets a pointer to the memory region beginning at the specified physical address. - u8* GetPhysicalPointer(PAddr address); + u8* GetPhysicalPointer(PAddr address) const; /// Returns a reference to the memory region beginning at the specified physical address MemoryRef GetPhysicalRef(PAddr address) const;