From 9be5424f235d9e957b5efaa924a613596dd68985 Mon Sep 17 00:00:00 2001 From: Gericom Date: Fri, 2 Jan 2026 15:36:33 +0100 Subject: [PATCH] Changed PatchCode::GetAddressAtTarget from public to protected --- arm9/source/patches/PatchCode.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arm9/source/patches/PatchCode.h b/arm9/source/patches/PatchCode.h index d8a0720..e6aacd0 100644 --- a/arm9/source/patches/PatchCode.h +++ b/arm9/source/patches/PatchCode.h @@ -20,15 +20,6 @@ public: while (1); } - /// @brief Converts a pointer inside the original code block - /// to a pointer at the target location in the patch heap. - /// @param ptr The pointer to convert. - /// @return The converted pointer. - const void* GetAddressAtTarget(const void* ptr) const - { - return (const void*)((u32)ptr - (u32)_code + (u32)_targetAddress); - } - /// @brief Copies the patch code to the target address. void CopyToTarget() const { @@ -44,4 +35,13 @@ protected: /// @brief The target address for the code block in the patch heap. void* const _targetAddress; + + /// @brief Converts a pointer inside the original code block + /// to a pointer at the target location in the patch heap. + /// @param ptr The pointer to convert. + /// @return The converted pointer. + const void* GetAddressAtTarget(const void* ptr) const + { + return (const void*)((u32)ptr - (u32)_code + (u32)_targetAddress); + } };