mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-04-01 23:16:52 +00:00
generator: use default value for optional generation
This commit is contained in:
parent
5f271e04fa
commit
2152f4626e
|
@ -149,14 +149,7 @@ namespace GtkSharp.Generation {
|
|||
|
||||
result [i] = p.PassAs != "" ? p.PassAs + " " : "";
|
||||
if (p.IsOptional && p.PassAs == String.Empty) {
|
||||
if (p.IsArray)
|
||||
result [i++] += "null";
|
||||
else if (p.Generatable is StructGen || p.Generatable is BoxedGen)
|
||||
result [i++] += p.CSType + ".Zero";
|
||||
else if (p.CSType == "System.IntPtr")
|
||||
result [i++] += "System.IntPtr.Zero";
|
||||
else
|
||||
result [i++] += "null";
|
||||
result [i++] += p.Generatable.DefaultValue;
|
||||
}
|
||||
else
|
||||
result [i++] += p.Name;
|
||||
|
|
Loading…
Reference in a new issue