From 591aa07b931bf9f7a3a53184a07982c8c2cf3b6c Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Wed, 19 Aug 2026 21:12:39 +0200 Subject: [PATCH] MMU.h: Remove useless consts in declarations Since the issue solved by the previous commit was spotted with clang-tidy, let's also fix its other complaints. https://clang.llvm.org/extra/clang-tidy/checks/readability/avoid-const-params-in-decls.html --- Source/Core/Core/PowerPC/MMU.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/PowerPC/MMU.h b/Source/Core/Core/PowerPC/MMU.h index 65a4cb8830..8c12ead73c 100644 --- a/Source/Core/Core/PowerPC/MMU.h +++ b/Source/Core/Core/PowerPC/MMU.h @@ -137,7 +137,7 @@ public: // space), a PanicAlert will be shown to the user and zero (or an empty string for the string // case) will be returned. template - static T HostRead(const Core::CPUThreadGuard& guard, const u32 address); + static T HostRead(const Core::CPUThreadGuard& guard, u32 address); template requires(!std::unsigned_integral) static T HostRead(const Core::CPUThreadGuard& guard, const u32 address) @@ -198,8 +198,8 @@ public: // user-visible alert on failure. template static std::optional - HostTryWrite(const Core::CPUThreadGuard& guard, const Common::MakeAtLeastU32 var, - const u32 address, RequestedAddressSpace space = RequestedAddressSpace::Effective); + HostTryWrite(const Core::CPUThreadGuard& guard, Common::MakeAtLeastU32 var, u32 address, + RequestedAddressSpace space = RequestedAddressSpace::Effective); template static std::optional HostTryWrite(const Core::CPUThreadGuard& guard, const T var, const u32 address, @@ -228,10 +228,10 @@ public: TryReadInstResult TryReadInstruction(u32 address); template - T Read(const u32 address); + T Read(u32 address); template - void Write(const Common::MakeAtLeastU32 var, const u32 address); + void Write(Common::MakeAtLeastU32 var, u32 address); void Write_U16_Swap(u32 var, u32 address); void Write_U32_Swap(u32 var, u32 address); @@ -328,7 +328,7 @@ private: TranslateAddressResult TranslateAddress(u32 address); template - TranslateAddressResult TranslatePageAddress(const EffectiveAddress address, bool* wi); + TranslateAddressResult TranslatePageAddress(EffectiveAddress address, bool* wi); void GenerateDSIException(u32 effective_address, bool write); void GenerateISIException(u32 effective_address); @@ -345,7 +345,7 @@ private: template T ReadFromHardware(u32 em_address); template - void WriteToHardware(u32 em_address, const u32 data, const u32 size); + void WriteToHardware(u32 em_address, u32 data, u32 size); template bool IsEffectiveRAMAddress(u32 address); bool IsPhysicalRAMAddress(u32 address) const;