[gtk+] flowbox: Remove unneeded checks
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] flowbox: Remove unneeded checks
- Date: Thu, 1 May 2014 13:14:33 +0000 (UTC)
commit 43e470dad10e0d9d0097ab201283ee2cd15a1a19
Author: Benjamin Otte <otte redhat com>
Date: Wed Apr 30 08:41:54 2014 +0200
flowbox: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
gtk/gtkflowbox.c | 24 ++++++++----------------
1 files changed, 8 insertions(+), 16 deletions(-)
---
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 6979f6a..9a03ec3 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -434,10 +434,8 @@ gtk_flow_box_child_get_preferred_height_for_width (GtkWidget *widget,
gtk_widget_get_preferred_height_for_width (child, width - full_border.left - full_border.right,
&child_min, &child_natural);
- if (minimum_height)
- *minimum_height = full_border.top + child_min + full_border.bottom;
- if (natural_height)
- *natural_height = full_border.top + child_natural + full_border.bottom;
+ *minimum_height = full_border.top + child_min + full_border.bottom;
+ *natural_height = full_border.top + child_natural + full_border.bottom;
}
else
{
@@ -461,10 +459,8 @@ gtk_flow_box_child_get_preferred_width (GtkWidget *widget,
if (child && gtk_widget_get_visible (child))
gtk_widget_get_preferred_width (child, &child_min, &child_natural);
- if (minimum_width)
- *minimum_width = full_border.left + child_min + full_border.right;
- if (natural_width)
- *natural_width = full_border.left + child_natural + full_border.right;
+ *minimum_width = full_border.left + child_min + full_border.right;
+ *natural_width = full_border.left + child_natural + full_border.right;
}
else
{
@@ -498,10 +494,8 @@ gtk_flow_box_child_get_preferred_width_for_height (GtkWidget *widget,
gtk_widget_get_preferred_width_for_height (child, height - full_border.top - full_border.bottom,
&child_min, &child_natural);
- if (minimum_width)
- *minimum_width = full_border.left + child_min + full_border.right;
- if (natural_width)
- *natural_width = full_border.left + child_natural + full_border.right;
+ *minimum_width = full_border.left + child_min + full_border.right;
+ *natural_width = full_border.left + child_natural + full_border.right;
}
}
@@ -529,10 +523,8 @@ gtk_flow_box_child_get_preferred_height (GtkWidget *widget,
if (child && gtk_widget_get_visible (child))
gtk_widget_get_preferred_height (child, &child_min, &child_natural);
- if (minimum_height)
- *minimum_height = full_border.top + child_min + full_border.bottom;
- if (natural_height)
- *natural_height = full_border.top + child_natural + full_border.bottom;
+ *minimum_height = full_border.top + child_min + full_border.bottom;
+ *natural_height = full_border.top + child_natural + full_border.bottom;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]