|
|
@ -1,6 +1,7 @@ |
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Text; |
|
|
|
using System.Text; |
|
|
|
using CppSharp.AST; |
|
|
|
using CppSharp.AST; |
|
|
|
|
|
|
|
using CppSharp.Generators.CSharp; |
|
|
|
using CppSharp.Types; |
|
|
|
using CppSharp.Types; |
|
|
|
using Delegate = CppSharp.AST.Delegate; |
|
|
|
using Delegate = CppSharp.AST.Delegate; |
|
|
|
|
|
|
|
|
|
|
@ -177,6 +178,14 @@ namespace CppSharp.Generators.CLI |
|
|
|
|
|
|
|
|
|
|
|
instance += Context.ReturnVarName; |
|
|
|
instance += Context.ReturnVarName; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (@class.IsRefType) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var name = Helpers.GeneratedIdentifier(Context.ReturnVarName); |
|
|
|
|
|
|
|
Context.SupportBefore.WriteLine("auto {0} = new ::{1}({2});", name, |
|
|
|
|
|
|
|
@class.QualifiedOriginalName, Context.ReturnVarName); |
|
|
|
|
|
|
|
instance = name; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WriteClassInstance(@class, instance); |
|
|
|
WriteClassInstance(@class, instance); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|