diff --git a/src/AST/ClassLayout.cs b/src/AST/ClassLayout.cs index f22a278d..06d97e47 100644 --- a/src/AST/ClassLayout.cs +++ b/src/AST/ClassLayout.cs @@ -31,14 +31,7 @@ namespace CppSharp.AST public Declaration Declaration; /// Method declaration (if Kind == FunctionPointer). - public Method Method - { - get - { - Debug.Assert(Kind == VTableComponentKind.FunctionPointer); - return Declaration as Method; - } - } + public Method Method => Declaration as Method; } /// diff --git a/src/Generator/AST/VTables.cs b/src/Generator/AST/VTables.cs index 13add5b8..93e59ed9 100644 --- a/src/Generator/AST/VTables.cs +++ b/src/Generator/AST/VTables.cs @@ -34,6 +34,7 @@ namespace CppSharp.AST where component.Kind != VTableComponentKind.CompleteDtorPointer && component.Kind != VTableComponentKind.RTTI && component.Kind != VTableComponentKind.UnusedFunctionPointer && + component.Kind != VTableComponentKind.OffsetToTop && component.Method != null select component);