GtkCssProvider: no need for resetting the parser prior to parsing data

This is done anyway on each iteration to parse_rule() in parse_stylesheet()
This commit is contained in:
Carlos Garnacho 2010-10-08 18:32:10 +02:00
parent 8e96e4e41f
commit 0ef48c0bde

View File

@ -2159,7 +2159,6 @@ gtk_css_provider_load_from_data (GtkCssProvider *css_provider,
if (priv->selectors_info->len > 0)
g_ptr_array_remove_range (priv->selectors_info, 0, priv->selectors_info->len);
css_provider_reset_parser (css_provider);
priv->scanner->input_name = "-";
g_scanner_input_text (priv->scanner, data, (guint) length);
@ -2200,7 +2199,6 @@ gtk_css_provider_load_from_file (GtkCssProvider *css_provider,
g_free (priv->filename);
priv->filename = g_file_get_path (file);
css_provider_reset_parser (css_provider);
priv->scanner->input_name = priv->filename;
g_scanner_input_text (priv->scanner, data, (guint) length);
@ -2248,7 +2246,6 @@ gtk_css_provider_load_from_path (GtkCssProvider *css_provider,
g_free (priv->filename);
priv->filename = g_strdup (path);
css_provider_reset_parser (css_provider);
priv->scanner->input_name = priv->filename;
g_scanner_input_text (priv->scanner, data, (guint) length);