Browse Source

Use the previously declared local variable.

pull/1/head
triton 13 years ago
parent
commit
6b5f218258
  1. 3
      src/Generator/Generators/CSharp/CSharpMarshal.cs

3
src/Generator/Generators/CSharp/CSharpMarshal.cs

@ -200,8 +200,7 @@ namespace CppSharp.Generators.CSharp
string instance = Context.ReturnVarName; string instance = Context.ReturnVarName;
if (ctx.Kind == CSharpMarshalKind.NativeField) if (ctx.Kind == CSharpMarshalKind.NativeField)
{ {
instance = string.Format("new System.IntPtr(&{0})", instance = string.Format("new System.IntPtr(&{0})", instance);
Context.ReturnVarName);
} }
Context.Return.Write("new {0}({1})", QualifiedIdentifier(@class), Context.Return.Write("new {0}({1})", QualifiedIdentifier(@class),

Loading…
Cancel
Save