[gtk+] spinner: Remove unneeded checks



commit a1bba344f241f5c054e8dc7813fb9e3842363a73
Author: Benjamin Otte <otte redhat com>
Date:   Wed Apr 30 08:35:24 2014 +0200

    spinner: Remove unneeded checks
    
    Size vfuncs always get non-null out variables passed, so no need to
    check for NULL.

 gtk/gtkspinner.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkspinner.c b/gtk/gtkspinner.c
index 77f6e9a..86c4e1a 100644
--- a/gtk/gtkspinner.c
+++ b/gtk/gtkspinner.c
@@ -34,6 +34,7 @@
 #include "gtkimage.h"
 #include "gtkintl.h"
 #include "gtkstylecontext.h"
+#include "gtkstylecontextprivate.h"
 #include "a11y/gtkspinneraccessible.h"
 
 
@@ -172,11 +173,8 @@ gtk_spinner_get_preferred_width (GtkWidget *widget,
                                  gint      *minimum_size,
                                  gint      *natural_size)
 {
-  if (minimum_size)
-    *minimum_size = SPINNER_SIZE;
-
-  if (natural_size)
-    *natural_size = SPINNER_SIZE;
+  *minimum_size = SPINNER_SIZE;
+  *natural_size = SPINNER_SIZE;
 }
 
 static void
@@ -184,11 +182,8 @@ gtk_spinner_get_preferred_height (GtkWidget *widget,
                                   gint      *minimum_size,
                                   gint      *natural_size)
 {
-  if (minimum_size)
-    *minimum_size = SPINNER_SIZE;
-
-  if (natural_size)
-    *natural_size = SPINNER_SIZE;
+  *minimum_size = SPINNER_SIZE;
+  *natural_size = SPINNER_SIZE;
 }
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]