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