/* * vfunc.h * * Created on: Jan 8, 2017 * Author: nullifiedcat */ #ifndef VFUNC_HPP_ #define VFUNC_HPP_ template inline F vfunc(void *thisptr, uintptr_t idx, uintptr_t offset = 0) { void **vmt = *reinterpret_cast(uintptr_t(thisptr) + offset); return reinterpret_cast((vmt)[idx]); } #endif /* VFUNC_HPP_ */