aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-02-07 14:42:53 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-02-07 14:42:53 +0100
commit9032bd989b2ff743bf2a3c9210d3c158a2cd0981 (patch)
tree6e707930c51560029a96ea87b038fc0790d1cb7e /src
parent481f624e2592fc0967e94b84f1ce1d0f9e6ac9ce (diff)
minor cleanup
Diffstat (limited to 'src')
-rw-r--r--src/css.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/css.cc b/src/css.cc
index 884e7b69..5e37220f 100644
--- a/src/css.cc
+++ b/src/css.cc
@@ -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) {