[gtk+] menuitem: Remove unneeded checks
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] menuitem: Remove unneeded checks
- Date: Thu, 1 May 2014 13:16:04 +0000 (UTC)
commit b4ee8a9daf0f248c7792ce126650c866e50d7513
Author: Benjamin Otte <otte redhat com>
Date: Wed Apr 30 09:24:17 2014 +0200
menuitem: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
gtk/gtkmenuitem.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index e36715f..2b7e049 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -903,11 +903,8 @@ gtk_menu_item_get_preferred_width (GtkWidget *widget,
&accel_width);
priv->accelerator_width = accel_width;
- if (minimum_size)
- *minimum_size = min_width;
-
- if (natural_size)
- *natural_size = nat_width;
+ *minimum_size = min_width;
+ *natural_size = nat_width;
}
static void
@@ -1016,11 +1013,8 @@ gtk_menu_item_real_get_height (GtkWidget *widget,
&accel_width);
priv->accelerator_width = accel_width;
- if (minimum_size)
- *minimum_size = min_height;
-
- if (natural_size)
- *natural_size = nat_height;
+ *minimum_size = min_height;
+ *natural_size = nat_height;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]