2003-09-11 Mike Kestner <mkestner@ximian.com>

* generator/Parameters.cs (IsLength): use a switch to make the
	growing list of valid len types more readable.

svn path=/trunk/gtk-sharp/; revision=18029
This commit is contained in:
Mike Kestner 2003-09-11 05:11:18 +00:00
parent ac2b7b906a
commit 5e5a570be3
2 changed files with 22 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2003-09-11 Mike Kestner <mkestner@ximian.com>
* generator/Parameters.cs (IsLength): use a switch to make the
growing list of valid len types more readable.
2003-09-11 Mike Kestner <mkestner@ximian.com>
* generator/Ctor.cs : kill inline doc comments once and for all

View file

@ -49,8 +49,23 @@ namespace GtkSharp.Generation {
public bool IsLength {
get {
return ((CSType == "int" || CSType == "uint" || CSType == "long" || CSType == "ulong" || CSType == "short" || CSType == "ushort") &&
(Name.EndsWith("len") || Name.EndsWith("length")));
if (Name.EndsWith("len") || Name.EndsWith("length"))
switch (CSType) {
case "int":
case "uint":
case "long":
case "ulong":
case "short":
case "ushort":
return true;
break;
default:
return false;
break;
}
else
return false;
}
}