Skip to content

Commit d08a4be

Browse files
committed
CVirtualTable: add CMemory constructor
1 parent fa112ba commit d08a4be

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

include/dynlibutils/virtual.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ class CVirtualTable
123123
public: // Constructors.
124124
CVirtualTable() : m_pVTFs(nullptr) {}
125125
template<class T> CVirtualTable(T *pClass) : m_pVTFs(*reinterpret_cast<void ***>(pClass)) {}
126+
CVirtualTable(CMemory pClassMemory) : m_pVTFs(*pClassMemory.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)