From c4024663bbd5dbb0d788df03883523ea55e71916 Mon Sep 17 00:00:00 2001 From: Orange Date: Sun, 9 Nov 2025 17:08:57 +0300 Subject: [PATCH] Auto stash before checking out "origin/feature/gjk_algorithm" --- include/omath/rev_eng/internal_rev_object.hpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/include/omath/rev_eng/internal_rev_object.hpp b/include/omath/rev_eng/internal_rev_object.hpp index 71fda4a..56f205a 100644 --- a/include/omath/rev_eng/internal_rev_object.hpp +++ b/include/omath/rev_eng/internal_rev_object.hpp @@ -23,27 +23,26 @@ namespace omath::rev_eng return *reinterpret_cast(reinterpret_cast(this) + offset); } - template - ReturnType call_virtual_method(Args&&... arg_list) + template + ReturnType call_virtual_method(auto... arg_list) { #ifdef _MSC_VER using VirtualMethodType = ReturnType(__thiscall*)(void*, decltype(arg_list)...); #else using VirtualMethodType = ReturnType (*)(void*, decltype(arg_list)...); #endif - return (*reinterpret_cast(this))[id](this, std::forward(arg_list)...); + return (*reinterpret_cast(this))[id](this, arg_list...); } - template - ReturnType call_virtual_method(Args&&... arg_list) const + template + ReturnType call_virtual_method(auto... arg_list) const { - using This = std::remove_cv_t>; #ifdef _MSC_VER - using VirtualMethodType = ReturnType(__thiscall*)(const void*, decltype(arg_list)...); + using VirtualMethodType = ReturnType(__thiscall*)(void*, decltype(arg_list)...); #else using VirtualMethodType = ReturnType (*)(void*, decltype(arg_list)...); #endif - return (*reinterpret_cast(const_cast(this)))[id]( - const_cast(static_cast(this)), std::forward(arg_list)...); + return (*static_cast((void*)(this)))[id]( + const_cast(static_cast(this)), arg_list...); } }; } // namespace omath::rev_eng