[gtk+] treeview: Remove unneeded checks
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: Remove unneeded checks
- Date: Thu, 1 May 2014 13:15:04 +0000 (UTC)
commit a158a2aa48c8023f99963642cc2657bff207b82d
Author: Benjamin Otte <otte redhat com>
Date: Wed Apr 30 09:10:27 2014 +0200
treeview: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
gtk/gtktreeview.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 9c06762..9de4db6 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2540,10 +2540,8 @@ gtk_tree_view_get_preferred_width (GtkWidget *widget,
tree_view->priv->n_expand_columns++;
}
- if (minimum != NULL)
- *minimum = tree_view->priv->minimum_width;
- if (natural != NULL)
- *natural = tree_view->priv->natural_width;
+ *minimum = tree_view->priv->minimum_width;
+ *natural = tree_view->priv->natural_width;
}
static void
@@ -2558,10 +2556,8 @@ gtk_tree_view_get_preferred_height (GtkWidget *widget,
height = gtk_tree_view_get_height (tree_view) + gtk_tree_view_get_effective_header_height (tree_view);
- if (minimum != NULL)
- *minimum = height;
- if (natural != NULL)
- *natural = height;
+ *minimum = height;
+ *natural = height;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]