[gtk+] grid: Remove unneeded checks
- From: Benjamin Otte <otte src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk+] grid: Remove unneeded checks
 
- Date: Thu,  1 May 2014 13:15:24 +0000 (UTC)
 
commit f72b496a457d15ad4b3739e7989598da362eb536
Author: Benjamin Otte <otte redhat com>
Date:   Wed Apr 30 09:15:24 2014 +0200
    grid: Remove unneeded checks
    
    Size vfuncs always get non-null out variables passed, so no need to
    check for NULL.
 gtk/gtkgrid.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index 7cac6f8..69d29f4 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -1123,11 +1123,8 @@ gtk_grid_request_sum (GtkGridRequest *request,
       nat -= linedata->spacing;
     }
 
-  if (minimum)
-    *minimum = min;
-
-  if (natural)
-    *natural = nat;
+  *minimum = min;
+  *natural = nat;
 }
 
 /* Computes minimum and natural fields of lines.
@@ -1428,11 +1425,8 @@ gtk_grid_get_size (GtkGrid        *grid,
   GtkGridRequest request;
   GtkGridLines *lines;
 
-  if (minimum)
-    *minimum = 0;
-
-  if (natural)
-    *natural = 0;
+  *minimum = 0;
+  *natural = 0;
 
   if (minimum_baseline)
     *minimum_baseline = -1;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]