Browse Source

Fix IsInternalClassNested usage

refactor
josetr 3 years ago
parent
commit
6bf823e3b9
  1. 4
      src/Generator/Generators/CSharp/CSharpSources.cs

4
src/Generator/Generators/CSharp/CSharpSources.cs

@ -1054,7 +1054,7 @@ namespace CppSharp.Generators.CSharp @@ -1054,7 +1054,7 @@ namespace CppSharp.Generators.CSharp
else
{
var typeName = TypePrinter.PrintNative(@class);
if (IsInternalClassNested(field.Class))
if (IsInternalClassNested(@class))
typeName.RemoveNamespace();
returnVar = $"(({typeName}*){Helpers.InstanceIdentifier})->{name}";
}
@ -1415,7 +1415,7 @@ namespace CppSharp.Generators.CSharp @@ -1415,7 +1415,7 @@ namespace CppSharp.Generators.CSharp
else
{
var typeName = TypePrinter.PrintNative(@class);
if (IsInternalClassNested(field.Class))
if (IsInternalClassNested(@class))
typeName.RemoveNamespace();
returnVar = $"(({typeName}*){Helpers.InstanceIdentifier})->{name}";
// Class field getter should return a reference object instead of a copy. Wrapping `returnVar` in

Loading…
Cancel
Save