mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
st/shadow: Add a fast path to comparisons
We do this in most places in St, it's consistent to do it here, too. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1744>
This commit is contained in:
parent
8b3e1e01f6
commit
3b4a1fcd51
1 changed files with 3 additions and 0 deletions
|
|
@ -126,6 +126,9 @@ st_shadow_equal (StShadow *shadow,
|
|||
g_return_val_if_fail (shadow != NULL, FALSE);
|
||||
g_return_val_if_fail (other != NULL, FALSE);
|
||||
|
||||
if (shadow == other)
|
||||
return TRUE;
|
||||
|
||||
/* We use strict equality to compare double quantities; this means
|
||||
* that, for example, a shadow offset of 0.25in does not necessarily
|
||||
* compare equal to a shadow offset of 18pt in this test. Assume
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue