From 98f4e7e81783db9649353112d9d3dfaa1f744ffe Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 18 Jan 2024 16:09:29 -0300 Subject: [PATCH] no need to overload addressOfNonVirtual --- loader/include/Geode/utils/addresser.hpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/loader/include/Geode/utils/addresser.hpp b/loader/include/Geode/utils/addresser.hpp index 330133c1..0fbb52ae 100644 --- a/loader/include/Geode/utils/addresser.hpp +++ b/loader/include/Geode/utils/addresser.hpp @@ -119,20 +119,10 @@ namespace geode::addresser { return addressOfVirtual(reinterpret_cast(func)); } - template - static intptr_t addressOfNonVirtual(Return (Class::*func)(Parameters...) const) { - return addressOfNonVirtual(reinterpret_cast(func)); - } - static intptr_t followThunkFunction(intptr_t address); - template - static intptr_t addressOfNonVirtual(Return (Class::*func)(Parameters...)) { - return followThunkFunction(geode::cast::reference_cast(func)); - } - - template - static intptr_t addressOfNonVirtual(Return (*func)(Parameters...)) { + template + static intptr_t addressOfNonVirtual(FnPtr func) { return followThunkFunction(geode::cast::reference_cast(func)); }