mirror of
https://github.com/orange-cpp/omath.git
synced 2026-04-18 19:03:28 +00:00
swaped to std::uintptr_t
This commit is contained in:
@@ -120,14 +120,14 @@ namespace omath::rev_eng
|
|||||||
ReturnType call_virtual_method(auto... arg_list)
|
ReturnType call_virtual_method(auto... arg_list)
|
||||||
{
|
{
|
||||||
const auto vtable = *reinterpret_cast<void***>(
|
const auto vtable = *reinterpret_cast<void***>(
|
||||||
reinterpret_cast<std::uintptr_t>(this) + TableIndex * sizeof(void*));
|
reinterpret_cast<std::uintptr_t>(this) + TableIndex * sizeof(std::uintptr_t));
|
||||||
return call_method<ReturnType>(vtable[Id], arg_list...);
|
return call_method<ReturnType>(vtable[Id], arg_list...);
|
||||||
}
|
}
|
||||||
template<std::size_t TableIndex, std::size_t Id, class ReturnType>
|
template<std::size_t TableIndex, std::size_t Id, class ReturnType>
|
||||||
ReturnType call_virtual_method(auto... arg_list) const
|
ReturnType call_virtual_method(auto... arg_list) const
|
||||||
{
|
{
|
||||||
const auto vtable = *reinterpret_cast<void* const* const*>(
|
const auto vtable = *reinterpret_cast<void* const* const*>(
|
||||||
reinterpret_cast<std::uintptr_t>(this) + TableIndex * sizeof(void*));
|
reinterpret_cast<std::uintptr_t>(this) + TableIndex * sizeof(std::uintptr_t));
|
||||||
return call_method<ReturnType>(vtable[Id], arg_list...);
|
return call_method<ReturnType>(vtable[Id], arg_list...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user