diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-02-06 21:17:42 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-02-06 21:17:42 +0100 |
commit | b65e704d76928e1a3f3984e8206840d87ea19a64 (patch) | |
tree | 26655491f1ecfe645f5a84f3265b1835a44f20d1 /src/css.cc | |
parent | 4c20db174b4d8ccb982a650c4923794497fdf68f (diff) |
set type in CssPropertyList::set()
Diffstat (limited to 'src/css.cc')
-rw-r--r-- | src/css.cc | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -32,13 +32,17 @@ CssPropertyList::~CssPropertyList () { void CssPropertyList::set (CssPropertyName name, CssValueType type, CssPropertyValue value) { - for (int i = 0; i < size (); i++) - if (getRef (i)->name == name) { + for (int i = 0; i < size (); i++) { + CssProperty *prop = getRef (i); + + if (prop->name == name) { if (ownerOfStrings) - getRef (i)->free (); - getRef (i)->value = value; + prop->free (); + prop->type = type; + prop->value = value; return; } + } increase (); getRef (size () - 1)->name = name; |