[gtk/wip/baedert/for-master: 2/3] fixed: x/y passed to get_child_position are not optional



commit 83f36d3ba46e96660f3def7273c451aa2b5a9002
Author: Timm Bäder <mail baedert org>
Date:   Sun Aug 25 14:59:01 2019 +0200

    fixed: x/y passed to get_child_position are not optional

 gtk/gtkfixed.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index dc6d34249c..ce14141848 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -183,8 +183,8 @@ gtk_fixed_put (GtkFixed  *fixed,
 void
 gtk_fixed_get_child_position (GtkFixed  *fixed,
                               GtkWidget *widget,
-                              gint      *x,
-                              gint      *y)
+                              int       *x,
+                              int       *y)
 {
   GtkFixedPrivate *priv = gtk_fixed_get_instance_private (fixed);
   GtkFixedLayoutChild *child_info;
@@ -193,16 +193,16 @@ gtk_fixed_get_child_position (GtkFixed  *fixed,
 
   g_return_if_fail (GTK_IS_FIXED (fixed));
   g_return_if_fail (GTK_IS_WIDGET (widget));
+  g_return_if_fail (x != NULL);
+  g_return_if_fail (y != NULL);
   g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (fixed));
 
   child_info = GTK_FIXED_LAYOUT_CHILD (gtk_layout_manager_get_layout_child (priv->layout, widget));
   transform = gtk_fixed_layout_child_get_transform (child_info);
   gsk_transform_to_translate (transform, &pos_x, &pos_y);
 
-  if (x != NULL)
-    *x = floorf (pos_x);
-  if (y != NULL)
-    *y = floorf (pos_y);
+  *x = floorf (pos_x);
+  *y = floorf (pos_y);
 }
 
 /**


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