diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-02-07 14:42:53 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-02-07 14:42:53 +0100 |
commit | 9032bd989b2ff743bf2a3c9210d3c158a2cd0981 (patch) | |
tree | 6e707930c51560029a96ea87b038fc0790d1cb7e | |
parent | 481f624e2592fc0967e94b84f1ce1d0f9e6ac9ce (diff) |
minor cleanup
-rw-r--r-- | src/css.cc | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -32,8 +32,10 @@ CssPropertyList::~CssPropertyList () { void CssPropertyList::set (CssPropertyName name, CssValueType type, CssPropertyValue value) { + CssProperty *prop; + for (int i = 0; i < size (); i++) { - CssProperty *prop = getRef (i); + prop = getRef (i); if (prop->name == name) { if (ownerOfStrings) @@ -45,9 +47,10 @@ void CssPropertyList::set (CssPropertyName name, CssValueType type, } increase (); - getRef (size () - 1)->name = name; - getRef (size () - 1)->type = type; - getRef (size () - 1)->value = value; + prop = getRef (size () - 1); + prop->name = name; + prop->type = type; + prop->value = value; } void CssPropertyList::apply (CssPropertyList *props) { |