aixxe 5d3e60ddd3 Initial commit.
* Beginning reconstruction of Source SDK.

Signed-off-by: aixxe <me@aixxe.net>
2016-12-19 17:14:26 +00:00

13 lines
393 B
C++

#pragma once
inline void**& GetVirtualTable(void* baseclass) {
return *reinterpret_cast<void***>(baseclass);
}
inline void* GetVirtualFunction(void* vftable, size_t index) {
return reinterpret_cast<void*>(GetVirtualTable(vftable)[index]);
}
template <typename Fn> inline Fn GetVirtualFunction(void* vftable, size_t index) {
return reinterpret_cast<Fn>(GetVirtualTable(vftable)[index]);
}