Skip to content

Commit 23b7f16

Browse files
committed
Update CVirtualTable constructors
1 parent fa112ba commit 23b7f16

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

include/dynlibutils/virtual.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ class CVirtualTable
122122

123123
public: // Constructors.
124124
CVirtualTable() : m_pVTFs(nullptr) {}
125-
template<class T> CVirtualTable(T *pClass) : m_pVTFs(*reinterpret_cast<void ***>(pClass)) {}
125+
CVirtualTable(void *pClass) : m_pVTFs(*reinterpret_cast<void ***>(pClass)) {}
126+
CVirtualTable(CMemory pVTFs) : m_pVTFs(pVTFs.RCast<void **>()) {}
126127

127128
public: // Getters.
128129
template<typename R> R &GetMethod(std::ptrdiff_t nIndex) { return reinterpret_cast<R &>(m_pVTFs[nIndex]); }

0 commit comments

Comments
 (0)