forked from AuroraMiddleware/gtk
widget: Remove some always-true precondition checks
This commit is contained in:
parent
d98a23dc80
commit
5204802f61
@ -7874,7 +7874,6 @@ gtk_widget_set_state_flags (GtkWidget *widget,
|
|||||||
#define ALLOWED_FLAGS (~(GTK_STATE_FLAG_DIR_LTR | GTK_STATE_FLAG_DIR_RTL))
|
#define ALLOWED_FLAGS (~(GTK_STATE_FLAG_DIR_LTR | GTK_STATE_FLAG_DIR_RTL))
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||||
g_return_if_fail (flags < (1 << GTK_STATE_FLAGS_BITS));
|
|
||||||
|
|
||||||
if ((!clear && (widget->priv->state_flags & flags) == flags) ||
|
if ((!clear && (widget->priv->state_flags & flags) == flags) ||
|
||||||
(clear && widget->priv->state_flags == flags))
|
(clear && widget->priv->state_flags == flags))
|
||||||
@ -7904,7 +7903,6 @@ gtk_widget_unset_state_flags (GtkWidget *widget,
|
|||||||
GtkStateFlags flags)
|
GtkStateFlags flags)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||||
g_return_if_fail (flags < (1 << GTK_STATE_FLAGS_BITS));
|
|
||||||
|
|
||||||
if ((widget->priv->state_flags & flags) == 0)
|
if ((widget->priv->state_flags & flags) == 0)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user