changeset 919:157e7fdf521a

minor cleanup
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Sat, 07 Feb 2009 14:42:53 +0100
parents fa79176adf1a
children 30705c82cb71
files src/css.cc
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/css.cc	Fri Feb 06 21:44:50 2009 +0100
+++ b/src/css.cc	Sat Feb 07 14:42:53 2009 +0100
@@ -32,8 +32,10 @@
 
 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 @@
    }
 
    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) {