aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-10-17 17:49:10 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-10-17 17:49:10 +0200
commitfde258b24ec096ffc7d4d68f02cccbc36f896d96 (patch)
treebd45c67cfae52d8af45af48796765d8cd2c6f4fa /src
parente0f49e146d2fc54d9f69d698089dc7b903b96ee0 (diff)
no need to inline CssPropertyList copy constructor
Diffstat (limited to 'src')
-rw-r--r--src/css.cc22
-rw-r--r--src/css.hh21
2 files changed, 23 insertions, 20 deletions
diff --git a/src/css.cc b/src/css.cc
index 384845f4..b791ba0c 100644
--- a/src/css.cc
+++ b/src/css.cc
@@ -25,6 +25,28 @@ void CssProperty::print () {
(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++)
diff --git a/src/css.hh b/src/css.hh
index 4ed854d1..bfacb0ef 100644
--- a/src/css.hh
+++ b/src/css.hh
@@ -304,26 +304,7 @@ class CssPropertyList : public lout::misc::SimpleVector <CssProperty> {
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,