GtkCssProvider: Small optimization.

This commit is contained in:
Carlos Garnacho 2010-08-04 11:36:21 +02:00
parent c001833ed1
commit 9ebbc7b5c5

View File

@ -429,10 +429,12 @@ compare_selector (GtkWidgetPath *path,
GSList *elements = selector->elements; GSList *elements = selector->elements;
gboolean match = TRUE; gboolean match = TRUE;
guint64 score = 0; guint64 score = 0;
guint len;
guint i = 0; guint i = 0;
while (elements && match && len = gtk_widget_path_length (path);
i < gtk_widget_path_length (path))
while (elements && match && i < len)
{ {
SelectorElement *elem; SelectorElement *elem;
guint8 elem_score; guint8 elem_score;