Remove another raw-delete.
This commit is contained in:
@ -1515,19 +1515,17 @@ CssSelector *CssParser::parseSelector()
|
||||
|
||||
void CssParser::parseRuleset()
|
||||
{
|
||||
lout::misc::SimpleVector < CssSelector * >*list;
|
||||
std::vector < CssSelector * > list;
|
||||
CssPropertyList *props, *importantProps;
|
||||
CssSelector *selector;
|
||||
|
||||
list = new lout::misc::SimpleVector < CssSelector * >(1);
|
||||
|
||||
while (true) {
|
||||
selector = parseSelector();
|
||||
|
||||
if (selector) {
|
||||
selector->ref();
|
||||
list->increase();
|
||||
list->set(list->size() - 1, selector);
|
||||
list.push_back(selector);
|
||||
}
|
||||
|
||||
// \todo dump whole ruleset in case of parse error as required by CSS 2.1
|
||||
@ -1560,8 +1558,8 @@ void CssParser::parseRuleset()
|
||||
withinBlock = false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < list->size(); i++) {
|
||||
CssSelector *s = list->get(i);
|
||||
for (std::size_t i = 0; i < list.size(); i++) {
|
||||
CssSelector *s = list.at(i);
|
||||
|
||||
if (origin == CSS_ORIGIN_USER_AGENT) {
|
||||
context->addRule(s, props, CSS_PRIMARY_USER_AGENT);
|
||||
@ -1579,7 +1577,7 @@ void CssParser::parseRuleset()
|
||||
props->unref();
|
||||
importantProps->unref();
|
||||
|
||||
delete list;
|
||||
list.clear();
|
||||
|
||||
if (ttype == CSS_TK_CHAR && tval[0] == '}')
|
||||
nextToken();
|
||||
|
Reference in New Issue
Block a user