[gtk+/gtk-3-22] GtkGestureMultiPress: Remove superfluous NULL check



commit 7adc38a64c5093e1cda6a2689ee172c548c8ff03
Author: Timm B├Ąder <mail baedert org>
Date:   Thu Apr 27 17:54:49 2017 +0200

    GtkGestureMultiPress: Remove superfluous NULL check
    
    The rect parameter in gtk_gesture_multi_press_set_area is annotated as
    nullable and the code handles the rect==NULL case, but the
    g_return_if_fail kept that case from ever happening.

 gtk/gtkgesturemultipress.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkgesturemultipress.c b/gtk/gtkgesturemultipress.c
index ebd01ea..c612735 100644
--- a/gtk/gtkgesturemultipress.c
+++ b/gtk/gtkgesturemultipress.c
@@ -403,7 +403,7 @@ gtk_gesture_multi_press_new (GtkWidget *widget)
 
 /**
  * gtk_gesture_multi_press_set_area:
- * @gesture: a #GtkGesture
+ * @gesture: a #GtkGestureMultiPress
  * @rect: (allow-none): rectangle to receive coordinates on
  *
  * If @rect is non-%NULL, the press area will be checked to be
@@ -425,7 +425,6 @@ gtk_gesture_multi_press_set_area (GtkGestureMultiPress *gesture,
   GtkGestureMultiPressPrivate *priv;
 
   g_return_if_fail (GTK_IS_GESTURE_MULTI_PRESS (gesture));
-  g_return_if_fail (rect != NULL);
 
   priv = gtk_gesture_multi_press_get_instance_private (gesture);
 


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