Browse Source

Formatting fixes.

pull/1/head
triton 13 years ago
parent
commit
b4e66d578a
  1. 8
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

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

@ -26,7 +26,7 @@ namespace CppSharp.Generators.CSharp
public static string GeneratedIdentifier(string id) public static string GeneratedIdentifier(string id)
{ {
return "__" + id; return "_" + id;
} }
public static string SafeIdentifier(string id) public static string SafeIdentifier(string id)
@ -576,6 +576,8 @@ namespace CppSharp.Generators.CSharp
} }
} }
#endregion
private void GenerateFieldProperty(Field field) private void GenerateFieldProperty(Field field)
{ {
var @class = field.Class; var @class = field.Class;
@ -944,7 +946,6 @@ namespace CppSharp.Generators.CSharp
// Output a default constructor that takes the native pointer. // Output a default constructor that takes the native pointer.
GenerateNativeConstructor(@class); GenerateNativeConstructor(@class);
NeedNewLine();
foreach (var ctor in @class.Constructors) foreach (var ctor in @class.Constructors)
{ {
@ -1030,7 +1031,6 @@ namespace CppSharp.Generators.CSharp
{ {
WriteLine("var {0} = (Internal*){1}.ToPointer();", WriteLine("var {0} = (Internal*){1}.ToPointer();",
Helpers.GeneratedIdentifier("ptr"), "native"); Helpers.GeneratedIdentifier("ptr"), "native");
GenerateStructMarshalingFields(@class); GenerateStructMarshalingFields(@class);
} }
@ -1062,7 +1062,7 @@ namespace CppSharp.Generators.CSharp
if (hasBase && !@class.IsValueType) if (hasBase && !@class.IsValueType)
{ {
PushIndent(); PushIndent();
Write(": this(", QualifiedIdentifier(@class.Bases[0].Class)); Write(": this(");
if (method != null) if (method != null)
Write("IntPtr.Zero"); Write("IntPtr.Zero");

Loading…
Cancel
Save