StThemeNode: add a trivial-case short cut to all comparisons for equality
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465 Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
This commit is contained in:
parent
4fc6a804f5
commit
52036871d1
@ -341,6 +341,10 @@ gboolean
|
||||
st_theme_node_equal (StThemeNode *node_a, StThemeNode *node_b)
|
||||
{
|
||||
g_return_val_if_fail (ST_IS_THEME_NODE (node_a), FALSE);
|
||||
|
||||
if (node_a == node_b)
|
||||
return TRUE;
|
||||
|
||||
g_return_val_if_fail (ST_IS_THEME_NODE (node_b), FALSE);
|
||||
|
||||
if (node_a->parent_node != node_b->parent_node ||
|
||||
@ -3548,6 +3552,10 @@ st_theme_node_geometry_equal (StThemeNode *node,
|
||||
StSide side;
|
||||
|
||||
g_return_val_if_fail (ST_IS_THEME_NODE (node), FALSE);
|
||||
|
||||
if (node == other)
|
||||
return TRUE;
|
||||
|
||||
g_return_val_if_fail (ST_IS_THEME_NODE (other), FALSE);
|
||||
|
||||
_st_theme_node_ensure_geometry (node);
|
||||
@ -3592,6 +3600,10 @@ st_theme_node_paint_equal (StThemeNode *node,
|
||||
int i;
|
||||
|
||||
g_return_val_if_fail (ST_IS_THEME_NODE (node), FALSE);
|
||||
|
||||
if (node == other)
|
||||
return TRUE;
|
||||
|
||||
g_return_val_if_fail (ST_IS_THEME_NODE (other), FALSE);
|
||||
|
||||
_st_theme_node_ensure_background (node);
|
||||
|
Loading…
Reference in New Issue
Block a user