Browse Source

Remove one-line method GenerateStructMarshaling and inline its content where it was called.

pull/1/head
triton 12 years ago
parent
commit
b41d3cfb6e
  1. 10
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

10
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -341,11 +341,6 @@ namespace CppSharp.Generators.CSharp @@ -341,11 +341,6 @@ namespace CppSharp.Generators.CSharp
typePrinter.PopContext();
}
private void GenerateStructMarshaling(Class @class)
{
GenerateStructMarshalingFields(@class);
}
private void GenerateStructMarshalingFields(Class @class)
{
foreach (var @base in @class.Bases)
@ -834,7 +829,10 @@ namespace CppSharp.Generators.CSharp @@ -834,7 +829,10 @@ namespace CppSharp.Generators.CSharp
}
else
{
GenerateStructMarshaling(@class);
WriteLine("var {0} = (Internal*){1}.ToPointer();",
Helpers.GeneratedIdentifier("ptr"), "native");
GenerateStructMarshalingFields(@class);
}
WriteCloseBraceIndent();

Loading…
Cancel
Save