From e47e9be6fd9f99acfa9e46c660b7c885a9141380 Mon Sep 17 00:00:00 2001 From: Bob Jamison Date: Thu, 27 Apr 2006 09:53:08 +0000 Subject: interim cleanup commit (bzr r597) --- src/dom/xpathtoken.cpp | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) (limited to 'src/dom/xpathtoken.cpp') 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 //######################################################################## @@ -188,6 +206,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; +} + /** * */ -- cgit v1.2.3