Remove duplicate GetVirtualFunction.

* Thanks to @luk1337 for pointing this out.

Signed-off-by: aixxe <me@aixxe.net>
This commit is contained in:
aixxe 2017-02-22 15:25:25 +00:00
parent 3eafa3649a
commit 0eb481e754
No known key found for this signature in database
GPG Key ID: EF00F521411ACB1F
1 changed files with 2 additions and 6 deletions

View File

@ -4,10 +4,6 @@ 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]);
template <typename Fn = void*> inline Fn GetVirtualFunction(void* baseclass, size_t index) {
return reinterpret_cast<Fn>(GetVirtualTable(baseclass)[index]);
}