clutter/color-state: Optimize equality by checking pointer equality
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3905>
This commit is contained in:
parent
69d66eb82f
commit
6a8701c4db
1 changed files with 3 additions and 0 deletions
|
@ -846,6 +846,9 @@ clutter_color_state_equals (ClutterColorState *color_state,
|
|||
g_return_val_if_fail (CLUTTER_IS_COLOR_STATE (color_state), FALSE);
|
||||
g_return_val_if_fail (CLUTTER_IS_COLOR_STATE (other_color_state), FALSE);
|
||||
|
||||
if (color_state == other_color_state)
|
||||
return TRUE;
|
||||
|
||||
priv = clutter_color_state_get_instance_private (color_state);
|
||||
other_priv = clutter_color_state_get_instance_private (other_color_state);
|
||||
|
||||
|
|
Loading…
Reference in a new issue