[gtk+] revealer: Remove unneeded checks



commit c0f556ab71b88540103bbc86f10402da98163081
Author: Benjamin Otte <otte redhat com>
Date:   Wed Apr 30 09:27:22 2014 +0200

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

 gtk/gtkrevealer.c |   24 ++++++++----------------
 1 files changed, 8 insertions(+), 16 deletions(-)
---
diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c
index 168e171..04a2af1 100644
--- a/gtk/gtkrevealer.c
+++ b/gtk/gtkrevealer.c
@@ -756,10 +756,8 @@ gtk_revealer_real_get_preferred_height (GtkWidget *widget,
 
   minimum_height = MIN (minimum_height, natural_height);
 
-  if (minimum_height_out)
-    *minimum_height_out = minimum_height;
-  if (natural_height_out)
-    *natural_height_out = natural_height;
+  *minimum_height_out = minimum_height;
+  *natural_height_out = natural_height;
 }
 
 static void
@@ -784,10 +782,8 @@ gtk_revealer_real_get_preferred_height_for_width (GtkWidget *widget,
 
   minimum_height = MIN (minimum_height, natural_height);
 
-  if (minimum_height_out)
-    *minimum_height_out = minimum_height;
-  if (natural_height_out)
-    *natural_height_out = natural_height;
+  *minimum_height_out = minimum_height;
+  *natural_height_out = natural_height;
 }
 
 static void
@@ -811,10 +807,8 @@ gtk_revealer_real_get_preferred_width (GtkWidget *widget,
 
   minimum_width = MIN (minimum_width, natural_width);
 
-  if (minimum_width_out)
-    *minimum_width_out = minimum_width;
-  if (natural_width_out)
-    *natural_width_out = natural_width;
+  *minimum_width_out = minimum_width;
+  *natural_width_out = natural_width;
 }
 
 static void
@@ -839,10 +833,8 @@ gtk_revealer_real_get_preferred_width_for_height (GtkWidget *widget,
 
   minimum_width = MIN (minimum_width, natural_width);
 
-  if (minimum_width_out)
-    *minimum_width_out = minimum_width;
-  if (natural_width_out)
-    *natural_width_out = natural_width;
+  *minimum_width_out = minimum_width;
+  *natural_width_out = natural_width;
 }
 
 /**


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