[gtk+] cssstyle: Add optimization
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] cssstyle: Add optimization
- Date: Wed, 18 Mar 2015 15:10:10 +0000 (UTC)
commit 3d1e2a055897287cb59b3969e0742d5c7d03f003
Author: Benjamin Otte <otte redhat com>
Date: Sun Feb 22 18:04:43 2015 +0100
cssstyle: Add optimization
There is no difference between a style and itself.
gtk/gtkcssstyle.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssstyle.c b/gtk/gtkcssstyle.c
index 040998b..0849191 100644
--- a/gtk/gtkcssstyle.c
+++ b/gtk/gtkcssstyle.c
@@ -82,6 +82,9 @@ gtk_css_style_get_difference (GtkCssStyle *style,
GtkBitmask *result;
guint i, len;
+ if (style == other)
+ return _gtk_bitmask_new ();
+
result = _gtk_bitmask_new ();
len = _gtk_css_style_property_get_n_properties ();
for (i = 0; i < len; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]