Browse Source

GenerateClassFields is now always called even when the current class has no fields because fields of a value type base class must generated.

pull/220/merge
marcos henrich 12 years ago committed by triton
parent
commit
734fe3348d
  1. 9
      src/Generator/Generators/CLI/CLIHeadersTemplate.cs

9
src/Generator/Generators/CLI/CLIHeadersTemplate.cs

@ -269,16 +269,15 @@ namespace CppSharp.Generators.CLI @@ -269,16 +269,15 @@ namespace CppSharp.Generators.CLI
GenerateClassVariables(@class);
if (@class.Fields.Any())
{
PushBlock(CLIBlockKind.AccessSpecifier);
WriteLine("private:");
PopBlock(NewLineKind.IfNotEmpty);
var accBlock = PopBlock(NewLineKind.IfNotEmpty);
PushBlock(CLIBlockKind.Fields);
GenerateClassFields(@class);
PopBlock();
}
var fieldsBlock = PopBlock();
accBlock.CheckGenerate = () => !fieldsBlock.IsEmpty;
WriteLine("};");
}

Loading…
Cancel
Save