mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
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
@ -123,8 +123,8 @@ namespace GtkSharp.Generation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (names.Count == Parameters.Count) {
|
if (names.Count == Parameters.Count) {
|
||||||
sw.WriteLine ("\t\t\t\tArrayList vals = new ArrayList();");
|
sw.WriteLine ("\t\t\t\tvar vals = new List<GLib.Value> ();");
|
||||||
sw.WriteLine ("\t\t\t\tArrayList names = new ArrayList();");
|
sw.WriteLine ("\t\t\t\tvar names = new List<string> ();");
|
||||||
for (int i = 0; i < names.Count; i++) {
|
for (int i = 0; i < names.Count; i++) {
|
||||||
Parameter p = Parameters [i];
|
Parameter p = Parameters [i];
|
||||||
string indent = "\t\t\t\t";
|
string indent = "\t\t\t\t";
|
||||||
@ -139,7 +139,7 @@ namespace GtkSharp.Generation {
|
|||||||
sw.WriteLine ("\t\t\t\t}");
|
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;");
|
sw.WriteLine ("\t\t\t\treturn;");
|
||||||
} else
|
} else
|
||||||
sw.WriteLine ("\t\t\t\tthrow new InvalidOperationException (\"Can't override this constructor.\");");
|
sw.WriteLine ("\t\t\t\tthrow new InvalidOperationException (\"Can't override this constructor.\");");
|
||||||
|
Loading…
Reference in New Issue
Block a user