From 209781ae3c793f4985ee15adcde390d101c06fb6 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 30 Apr 2014 09:17:07 +0200 Subject: [PATCH] headerbar: Remove unneeded checks Size vfuncs always get non-null out variables passed, so no need to check for NULL. --- gtk/gtkheaderbar.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c index 05dfc8f6af..c180925a6c 100644 --- a/gtk/gtkheaderbar.c +++ b/gtk/gtkheaderbar.c @@ -661,11 +661,8 @@ gtk_header_bar_get_size (GtkWidget *widget, natural = MAX (center_nat, natural + css_borders.top + css_borders.bottom); } - if (minimum_size) - *minimum_size = minimum; - - if (natural_size) - *natural_size = natural; + *minimum_size = minimum; + *natural_size = natural; } static void @@ -748,11 +745,8 @@ gtk_header_bar_compute_size_for_orientation (GtkWidget *widget, required_size += css_borders.left + css_borders.right; required_natural += css_borders.left + css_borders.right; - if (minimum_size) - *minimum_size = required_size; - - if (natural_size) - *natural_size = required_natural; + *minimum_size = required_size; + *natural_size = required_natural; } static void @@ -875,11 +869,8 @@ gtk_header_bar_compute_size_for_opposing_orientation (GtkWidget *widget, computed_minimum = MAX (center_min, computed_minimum + css_borders.top + css_borders.bottom); computed_natural = MAX (center_nat, computed_natural + css_borders.top + css_borders.bottom); - if (minimum_size) - *minimum_size = computed_minimum; - - if (natural_size) - *natural_size = computed_natural; + *minimum_size = computed_minimum; + *natural_size = computed_natural; } static void