diff --git a/include/omath/rev_eng/internal_rev_object.hpp b/include/omath/rev_eng/internal_rev_object.hpp index 9e1bfbb..4925230 100644 --- a/include/omath/rev_eng/internal_rev_object.hpp +++ b/include/omath/rev_eng/internal_rev_object.hpp @@ -119,7 +119,7 @@ namespace omath::rev_eng template ReturnType call_virtual_method(auto... arg_list) { - void* sub_this = reinterpret_cast( + auto sub_this = reinterpret_cast( reinterpret_cast(this) + TableIndex * sizeof(std::uintptr_t)); const auto vtable = *reinterpret_cast(sub_this); #ifdef _MSC_VER @@ -132,7 +132,7 @@ namespace omath::rev_eng template ReturnType call_virtual_method(auto... arg_list) const { - const void* sub_this = reinterpret_cast( + auto sub_this = reinterpret_cast( reinterpret_cast(this) + TableIndex * sizeof(std::uintptr_t)); const auto vtable = *reinterpret_cast(sub_this); #ifdef _MSC_VER