changeset 1744:49340e0f3414

no need to inline CssPropertyList copy constructor
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Sun, 17 Oct 2010 17:49:10 +0200
parents ebbf47417126
children 5098b7291738
files src/css.cc src/css.hh
diffstat 2 files changed, 23 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/css.cc	Sun Oct 17 14:20:16 2010 +0200
+++ b/src/css.cc	Sun Oct 17 17:49:10 2010 +0200
@@ -25,6 +25,28 @@
             (int)value.intVal);
 }
 
+CssPropertyList::CssPropertyList (const CssPropertyList &p, bool deep) :
+   lout::misc::SimpleVector <CssProperty> (p)
+{
+   refCount = 0;
+   if (deep) {
+      for (int i = 0; i < size (); i++) {
+         CssProperty *p = getRef(i);
+         switch (p->type) {
+            case CSS_TYPE_STRING:
+            case CSS_TYPE_SYMBOL:
+               p->value.strVal = dStrdup (p->value.strVal);
+               break;
+            default:
+               break;
+         }
+      }
+      ownerOfStrings = true;
+   } else {
+      ownerOfStrings = false;
+   }
+};
+
 CssPropertyList::~CssPropertyList () {
    if (ownerOfStrings)
       for (int i = 0; i < size (); i++)
--- a/src/css.hh	Sun Oct 17 14:20:16 2010 +0200
+++ b/src/css.hh	Sun Oct 17 17:49:10 2010 +0200
@@ -304,26 +304,7 @@
          refCount = 0;
          this->ownerOfStrings = ownerOfStrings;
       };
-      inline CssPropertyList(const CssPropertyList &p, bool deep = false) :
-         lout::misc::SimpleVector <CssProperty> (p) {
-         refCount = 0;
-         if (deep) {
-            for (int i = 0; i < size (); i++) {
-               CssProperty *p = getRef(i);
-               switch (p->type) {
-                  case CSS_TYPE_STRING:
-                  case CSS_TYPE_SYMBOL:
-                     p->value.strVal = dStrdup (p->value.strVal);
-                     break;
-                  default:
-                     break;
-               }
-            }
-            ownerOfStrings = true;
-         } else {
-            ownerOfStrings = false;
-         }
-      };
+      CssPropertyList(const CssPropertyList &p, bool deep = false);
       ~CssPropertyList ();
 
       void set (CssPropertyName name, CssValueType type,