summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2021-01-11 20:04:15 +0100
committerTimm Bäder <mail@baedert.org>2021-01-17 04:39:26 +0100
commit934b91f65fc99bf199bfa77b9173923b9369b2a5 (patch)
treeea64a62a0fa283be8dc14b0da2602026df58aecb
parentc3050231d14458678e9b3597b90746e5ae531a21 (diff)
downloadgtk+-934b91f65fc99bf199bfa77b9173923b9369b2a5.tar.gz
label: Remove unneeded NULL guards
The pointers passed to GtkWidgetClass::measure cannot be NULL
-rw-r--r--gtk/gtklabel.c18
1 files 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;
}
}
}