Browse Source

Simplified some code.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/829/head
Dimitar Dobrev 9 years ago
parent
commit
3969e21586
  1. 4
      src/Generator/Generators/CSharp/CSharpSources.cs

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

@ -833,7 +833,7 @@ namespace CppSharp.Generators.CSharp
var marshal = new CSharpMarshalManagedToNativePrinter(ctx); var marshal = new CSharpMarshalManagedToNativePrinter(ctx);
ctx.Declaration = field; ctx.Declaration = field;
var arrayType = field.Type as ArrayType ?? field.QualifiedType.Type.Desugar() as ArrayType; var arrayType = field.Type.Desugar() as ArrayType;
if (arrayType != null && @class.IsValueType) if (arrayType != null && @class.IsValueType)
{ {
@ -1078,7 +1078,7 @@ namespace CppSharp.Generators.CSharp
TypePrinter.PopContext(); TypePrinter.PopContext();
var arrayType = field.Type as ArrayType ?? field.QualifiedType.Type.Desugar() as ArrayType; var arrayType = field.Type.Desugar() as ArrayType;
if (arrayType != null && @class.IsValueType) if (arrayType != null && @class.IsValueType)
ctx.ReturnVarName = HandleValueArray(arrayType, field); ctx.ReturnVarName = HandleValueArray(arrayType, field);

Loading…
Cancel
Save