generator: simplify bool logic in Method class

There are two elements repeated in this expression:

(( ((A) || (B)) || (B)) && C)

We can simplify "(A || B) || B" to simply "A || B",
so the result is a bit more readable this way:

(A || B) && C
This commit is contained in:
Andrés G. Aragoneses 2013-10-21 17:09:40 +02:00
parent 8b998861e1
commit b13d51a32d

View file

@ -90,7 +90,7 @@ namespace GtkSharp.Generation {
}
Parameters parms = Parameters;
is_get = ((((parms.IsAccessor && retval.IsVoid) || (parms.Count == 0 && !retval.IsVoid)) || (parms.Count == 0 && !retval.IsVoid)) && HasGetterName);
is_get = ((parms.IsAccessor && retval.IsVoid) || (parms.Count == 0 && !retval.IsVoid)) && HasGetterName;
is_set = ((parms.IsAccessor || (parms.VisibleCount == 1 && retval.IsVoid)) && HasSetterName);
call = "(" + (IsStatic ? "" : container_type.CallByName () + (parms.Count > 0 ? ", " : "")) + Body.GetCallString (is_set) + ")";