2016-12-19 11:52:02 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
inline void**& GetVirtualTable(void* baseclass) {
|
|
|
|
return *reinterpret_cast<void***>(baseclass);
|
|
|
|
}
|
|
|
|
|
2017-02-22 10:25:25 -05:00
|
|
|
template <typename Fn = void*> inline Fn GetVirtualFunction(void* baseclass, size_t index) {
|
|
|
|
return reinterpret_cast<Fn>(GetVirtualTable(baseclass)[index]);
|
2016-12-19 11:52:02 -05:00
|
|
|
}
|