[gtk/wip/baedert/for-master: 35/36] label: Remove unneeded NULL guards
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 35/36] label: Remove unneeded NULL guards
- Date: Sun, 17 Jan 2021 03:45:13 +0000 (UTC)
commit 934b91f65fc99bf199bfa77b9173923b9369b2a5
Author: Timm Bäder <mail baedert org>
Date: Mon Jan 11 20:04:15 2021 +0100
label: Remove unneeded NULL guards
The pointers passed to GtkWidgetClass::measure cannot be NULL
gtk/gtklabel.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 9a1d5b4ae1..d520fa0e8e 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -1165,12 +1165,6 @@ gtk_label_get_preferred_size (GtkWidget *widget,
/* Normal desired width */
*minimum_size = smallest_rect.width;
*natural_size = widest_rect.width;
-
- if (minimum_baseline)
- *minimum_baseline = -1;
-
- if (natural_baseline)
- *natural_baseline = -1;
}
else /* GTK_ORIENTATION_VERTICAL */
{
@@ -1178,19 +1172,15 @@ gtk_label_get_preferred_size (GtkWidget *widget,
{
*minimum_size = smallest_rect.height;
*natural_size = widest_rect.height;
- if (minimum_baseline)
- *minimum_baseline = smallest_baseline;
- if (natural_baseline)
- *natural_baseline = widest_baseline;
+ *minimum_baseline = smallest_baseline;
+ *natural_baseline = widest_baseline;
}
else
{
*minimum_size = widest_rect.height;
*natural_size = smallest_rect.height;
- if (minimum_baseline)
- *minimum_baseline = widest_baseline;
- if (natural_baseline)
- *natural_baseline = smallest_baseline;
+ *minimum_baseline = widest_baseline;
+ *natural_baseline = smallest_baseline;
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]