From 38a037e1040a2934c3b38f82723ea575b7c53287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joa=CC=83o=20Matos?= Date: Wed, 1 Apr 2020 12:53:42 +0100 Subject: [PATCH] Fix generation of native instance constructors in C++ generator. --- src/Generator/Generators/C/CppSources.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Generator/Generators/C/CppSources.cs b/src/Generator/Generators/C/CppSources.cs index c70255ab..a6641beb 100644 --- a/src/Generator/Generators/C/CppSources.cs +++ b/src/Generator/Generators/C/CppSources.cs @@ -292,9 +292,12 @@ namespace CppSharp.Generators.Cpp var nativeType = $"::{@class.QualifiedOriginalName}*"; WriteLine($"{nativeType} {ClassCtorInstanceParamIdentifier})"); + GenerateClassConstructorBase(@class); WriteOpenBraceAndIndent(); + WriteLine($"{Helpers.InstanceIdentifier} = {ClassCtorInstanceParamIdentifier};"); + UnindentAndWriteCloseBrace(); NewLine(); }