[gtk+/wip/baedert/drawing: 238/396] popover: Remove useless if case
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 238/396] popover: Remove useless if case
- Date: Wed, 19 Jul 2017 11:30:22 +0000 (UTC)
commit 1010b2e759d53b72a98dce9ad636361ed65524a2
Author: Timm Bäder <mail baedert org>
Date: Sat Jun 3 14:38:56 2017 +0200
popover: Remove useless if case
rect is not nullable, so stop checking if it is NULL and instead add a
g_return_val_if_fail guard.
gtk/gtkpopover.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 2f866c9..84ce4e5 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -2121,16 +2121,14 @@ gtk_popover_get_pointing_to (GtkPopover *popover,
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
g_return_val_if_fail (GTK_IS_POPOVER (popover), FALSE);
+ g_return_val_if_fail (rect != NULL, FALSE);
- if (rect)
+ if (priv->has_pointing_to)
+ *rect = priv->pointing_to;
+ else if (priv->widget)
{
- if (priv->has_pointing_to)
- *rect = priv->pointing_to;
- else if (priv->widget)
- {
- gtk_widget_get_allocation (priv->widget, rect);
- rect->x = rect->y = 0;
- }
+ gtk_widget_get_allocation (priv->widget, rect);
+ rect->x = rect->y = 0;
}
return priv->has_pointing_to;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]