From f6fb8c8a662e8403a579ceb548b8b51701ed58cf Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 28 Nov 2008 14:21:55 +0000 Subject: Optimise css_stylesheet_add_rule by the cunning approach of not iterating through a singly linked list to find the end every time we want to insert a rule. This doubles parsing speed. svn path=/trunk/libcss/; revision=5811 --- src/stylesheet.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/stylesheet.h') diff --git a/src/stylesheet.h b/src/stylesheet.h index 2156b8e..a331299 100644 --- a/src/stylesheet.h +++ b/src/stylesheet.h @@ -142,6 +142,7 @@ struct css_stylesheet { uint32_t rule_count; /**< Number of rules in sheet */ css_rule *rule_list; /**< List of rules in sheet */ + css_rule *last_rule; /**< Last rule in list */ bool disabled; /**< Whether this sheet is * disabled */ -- cgit v1.2.3