generator: Use List<T> in generated constructors
This makes the generated code a bit nicer, but has no impact outside of the generated constructors.
This commit is contained in:
parent
15c5820cd8
commit
3d6decbd0d
1 changed files with 3 additions and 3 deletions
|
@ -123,8 +123,8 @@ namespace GtkSharp.Generation {
|
|||
}
|
||||
|
||||
if (names.Count == Parameters.Count) {
|
||||
sw.WriteLine ("\t\t\t\tArrayList vals = new ArrayList();");
|
||||
sw.WriteLine ("\t\t\t\tArrayList names = new ArrayList();");
|
||||
sw.WriteLine ("\t\t\t\tvar vals = new List<GLib.Value> ();");
|
||||
sw.WriteLine ("\t\t\t\tvar names = new List<string> ();");
|
||||
for (int i = 0; i < names.Count; i++) {
|
||||
Parameter p = Parameters [i];
|
||||
string indent = "\t\t\t\t";
|
||||
|
@ -139,7 +139,7 @@ namespace GtkSharp.Generation {
|
|||
sw.WriteLine ("\t\t\t\t}");
|
||||
}
|
||||
|
||||
sw.WriteLine ("\t\t\t\tCreateNativeObject ((string[])names.ToArray (typeof (string)), (GLib.Value[])vals.ToArray (typeof (GLib.Value)));");
|
||||
sw.WriteLine ("\t\t\t\tCreateNativeObject (names.ToArray (), vals.ToArray ());");
|
||||
sw.WriteLine ("\t\t\t\treturn;");
|
||||
} else
|
||||
sw.WriteLine ("\t\t\t\tthrow new InvalidOperationException (\"Can't override this constructor.\");");
|
||||
|
|
Loading…
Add table
Reference in a new issue