From b13d51a32d6f96a8065183a2a94dfd46b5939dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20G=2E=20Aragoneses?= Date: Mon, 21 Oct 2013 17:09:40 +0200 Subject: [PATCH] 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 --- generator/Method.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/Method.cs b/generator/Method.cs index 4e8e08161..14f0b65ec 100644 --- a/generator/Method.cs +++ b/generator/Method.cs @@ -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) + ")";