Browse Source

Merge pull request #86 from sk-havok/req/mismatched_braces

Avoid mismatched braces when the decl is neither a Function nor a Field
pull/91/head
João Matos 12 years ago
parent
commit
e8ce55e9f1
  1. 3
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

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

@ -858,6 +858,7 @@ namespace CppSharp.Generators.CSharp
var parameters = new List<Parameter> { param }; var parameters = new List<Parameter> { param };
GenerateInternalFunctionCall(function, parameters); GenerateInternalFunctionCall(function, parameters);
} }
WriteCloseBraceIndent();
} }
else if (decl is Field) else if (decl is Field)
{ {
@ -878,9 +879,9 @@ namespace CppSharp.Generators.CSharp
Helpers.SafeIdentifier(field.OriginalName), marshal.Context.Return); Helpers.SafeIdentifier(field.OriginalName), marshal.Context.Return);
WriteLine(";"); WriteLine(";");
WriteCloseBraceIndent();
} }
WriteCloseBraceIndent();
PopBlock(NewLineKind.BeforeNextBlock); PopBlock(NewLineKind.BeforeNextBlock);
} }

Loading…
Cancel
Save