[gtk/matthiasc/for-master: 38/39] css: Drop unsused bitmasks



commit 003b39708408ed839985267b71eb1f1a09bfdd45
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 14 16:44:31 2020 -0500

    css: Drop unsused bitmasks
    
    GtkCssProvider was maintaining bitmasks for the
    set properties in each ruleset. The masks are never
    used, so drop them.

 gtk/gtkcssprovider.c | 12 ------------
 1 file changed, 12 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 5c4c6e9e2e..b7d7fcf731 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -99,7 +99,6 @@ struct GtkCssRuleset
   GtkCssSelector *selector;
   GtkCssSelectorTree *selector_match;
   PropertyValue *styles;
-  GtkBitmask *set_styles;
   guint n_styles;
   guint owns_styles : 1;
 };
@@ -236,8 +235,6 @@ gtk_css_ruleset_init_copy (GtkCssRuleset       *new,
   /* First copy takes over ownership */
   if (ruleset->owns_styles)
     ruleset->owns_styles = FALSE;
-  if (new->set_styles)
-    new->set_styles = _gtk_bitmask_copy (new->set_styles);
 }
 
 static void
@@ -256,8 +253,6 @@ gtk_css_ruleset_clear (GtkCssRuleset *ruleset)
         }
       g_free (ruleset->styles);
     }
-  if (ruleset->set_styles)
-    _gtk_bitmask_free (ruleset->set_styles);
   if (ruleset->selector)
     _gtk_css_selector_free (ruleset->selector);
 
@@ -274,13 +269,6 @@ gtk_css_ruleset_add (GtkCssRuleset       *ruleset,
 
   g_return_if_fail (ruleset->owns_styles || ruleset->n_styles == 0);
 
-  if (ruleset->set_styles == NULL)
-    ruleset->set_styles = _gtk_bitmask_new ();
-
-  ruleset->set_styles = _gtk_bitmask_set (ruleset->set_styles,
-                                          _gtk_css_style_property_get_id (property),
-                                          TRUE);
-
   ruleset->owns_styles = TRUE;
 
   for (i = 0; i < ruleset->n_styles; i++)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]