[gtk+] popover: Remove unneeded checks
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] popover: Remove unneeded checks
- Date: Thu, 1 May 2014 13:16:09 +0000 (UTC)
commit 17e0f9fb0a53f153b6b6f7c3386f760a26e8e6db
Author: Benjamin Otte <otte redhat com>
Date: Wed Apr 30 09:26:28 2014 +0200
popover: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
gtk/gtkpopover.c | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index a173a96..04796fc 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -991,11 +991,8 @@ gtk_popover_get_preferred_width (GtkWidget *widget,
min += extra;
nat += extra;
- if (minimum_width)
- *minimum_width = min;
-
- if (natural_width)
- *natural_width = nat;
+ *minimum_width = min;
+ *natural_width = nat;
}
static void
@@ -1034,11 +1031,8 @@ gtk_popover_get_preferred_width_for_height (GtkWidget *widget,
min += extra;
nat += extra;
- if (minimum_width)
- *minimum_width = min;
-
- if (natural_width)
- *natural_width = nat;
+ *minimum_width = min;
+ *natural_width = nat;
}
static void
@@ -1068,11 +1062,8 @@ gtk_popover_get_preferred_height (GtkWidget *widget,
min += extra;
nat += extra;
- if (minimum_height)
- *minimum_height = min;
-
- if (natural_height)
- *natural_height = nat;
+ *minimum_height = min;
+ *natural_height = nat;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]