[gtk+] widget: Remove useless NULL check



commit cb419794f89ad00a2e1755adb2670efa97cdb686
Author: Timm Bäder <mail baedert org>
Date:   Tue May 3 17:49:20 2016 +0200

    widget: Remove useless NULL check
    
    We are checking for allocation != NULL at the beginning of the function
    already. This also means that the allocation parameter is not nullable.

 gtk/gtkwidget.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 4e26657..0be00ed 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15596,7 +15596,7 @@ _gtk_widget_set_simple_clip (GtkWidget     *widget,
 /**
  * gtk_widget_get_allocated_size:
  * @widget: a #GtkWidget
- * @allocation: (out) (allow-none): a pointer to a #GtkAllocation to copy to
+ * @allocation: (out): a pointer to a #GtkAllocation to copy to
  * @baseline: (out) (allow-none): a pointer to an integer to copy to
  *
  * Retrieves the widget’s allocated size.
@@ -15623,8 +15623,8 @@ gtk_widget_get_allocated_size (GtkWidget     *widget,
 
   priv = widget->priv;
 
-  if (allocation)
-    *allocation = priv->allocated_size;
+  *allocation = priv->allocated_size;
+
   if (baseline)
     *baseline = priv->allocated_size_baseline;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]