diff options
Diffstat (limited to 'src/dom/xpathtoken.cpp')
| -rw-r--r-- | src/dom/xpathtoken.cpp | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/src/dom/xpathtoken.cpp b/src/dom/xpathtoken.cpp index 0254266d0..bed022943 100644 --- a/src/dom/xpathtoken.cpp +++ b/src/dom/xpathtoken.cpp @@ -62,9 +62,7 @@ StackItem::StackItem() */
StackItem::StackItem(const StackItem &other)
{
- sval = other.sval;
- ival = other.ival;
- dval = other.dval;
+ assign(other);
}
@@ -76,6 +74,26 @@ StackItem::~StackItem() }
+/**
+ *
+ */
+StackItem &StackItem::operator=(const StackItem &other)
+{
+ assign(other);
+ return *this;
+}
+
+/**
+ *
+ */
+void StackItem::assign(const StackItem &other)
+{
+ sval = other.sval;
+ ival = other.ival;
+ dval = other.dval;
+}
+
+
//########################################################################
//# X P A T H S T A C K
//########################################################################
@@ -191,6 +209,31 @@ TokenList::TokenList() /**
*
*/
+TokenList::TokenList(const TokenList &other)
+{
+ assign(other);
+}
+
+/**
+ *
+ */
+TokenList &TokenList::operator=(const TokenList &other)
+{
+ assign(other);
+ return *this;
+}
+
+/**
+ *
+ */
+void TokenList::assign(const TokenList &other)
+{
+ tokens = other.tokens;
+}
+
+/**
+ *
+ */
TokenList::~TokenList()
{
clear();
|
