From f9accf226b41990ce3e3c3d340abe536e99cda9a Mon Sep 17 00:00:00 2001 From: triton Date: Sun, 26 May 2013 18:23:01 +0100 Subject: [PATCH] Call the default constructors for value types so all fields are initialized. --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 8a29bd23..0bd42eab 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -1073,6 +1073,9 @@ namespace CppSharp.Generators.CSharp PopIndent(); } + if (@class.IsValueType) + WriteLineIndent(": this()"); + return hasBase; }