From 3b4a1fcd51c087bb242fe3f8e3bd7a1280bd0aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Fri, 5 Mar 2021 12:28:39 +0100 Subject: [PATCH] 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: --- src/st/st-shadow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/st/st-shadow.c b/src/st/st-shadow.c index ab3eaa856..0a8e319ad 100644 --- a/src/st/st-shadow.c +++ b/src/st/st-shadow.c @@ -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