summaryrefslogtreecommitdiffstats
path: root/src/dom
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2013-02-11 17:57:49 +0000
committerKris <Kris.De.Gussem@hotmail.com>2013-02-11 17:57:49 +0000
commite8377a78c88424dd76f8fc47c61f436efd5470e7 (patch)
tree6fc8e7f96e4dea82d3b781a8813401c3522e0938 /src/dom
parentMove cell_data_func and separator_func from text-toolbar to font-lister. (diff)
downloadinkscape-e8377a78c88424dd76f8fc47c61f436efd5470e7.tar.gz
inkscape-e8377a78c88424dd76f8fc47c61f436efd5470e7.zip
cppcheck
(bzr r12117)
Diffstat (limited to 'src/dom')
-rw-r--r--src/dom/xpathparser.cpp2
-rw-r--r--src/dom/xpathtoken.cpp20
-rw-r--r--src/dom/xpathtoken.h6
3 files changed, 9 insertions, 19 deletions
diff --git a/src/dom/xpathparser.cpp b/src/dom/xpathparser.cpp
index 393c12cda..b19975966 100644
--- a/src/dom/xpathparser.cpp
+++ b/src/dom/xpathparser.cpp
@@ -131,7 +131,7 @@ void XPathParser::lexicalTokenDump()
printf("####### LEXICAL TOKENS #######\n");
for (unsigned int i=0 ; i<lexicalTokens.size() ; i++)
{
- printf("%d : ", i);
+ printf("%u : ", i);
lexicalTokens[i].print();
}
printf("##### END LEXICAL TOKENS #####\n\n");
diff --git a/src/dom/xpathtoken.cpp b/src/dom/xpathtoken.cpp
index 79948e55e..216c7a069 100644
--- a/src/dom/xpathtoken.cpp
+++ b/src/dom/xpathtoken.cpp
@@ -937,19 +937,21 @@ Token Token::create(int type, long ival,
/**
*
*/
-TokenExecutor::TokenExecutor()
+TokenExecutor::TokenExecutor() :
+ tokenList (),
+ nodeList ()
{
- reset();
}
/**
*
*/
-TokenExecutor::TokenExecutor(const TokenExecutor &other)
+TokenExecutor::TokenExecutor(const TokenExecutor &other) :
+ tokenList (other.tokenList),
+ nodeList ()
{
- reset();
- assign(other);
+ // assign(other);
}
@@ -970,14 +972,6 @@ void TokenExecutor::assign(const TokenExecutor &other)
}
-/**
- *
- */
-void TokenExecutor::reset()
-{
-}
-
-
/**
diff --git a/src/dom/xpathtoken.h b/src/dom/xpathtoken.h
index 5bb87917b..cfd54298e 100644
--- a/src/dom/xpathtoken.h
+++ b/src/dom/xpathtoken.h
@@ -457,7 +457,7 @@ public:
*/
StackItem pop()
{
- if (stackItems.size() < 1)
+ if (stackItems.empty())
{
//TODO: error here
StackItem item;
@@ -619,10 +619,6 @@ public:
*/
virtual void assign(const TokenExecutor &other);
- /**
- * Reset the stack to its original settings
- */
- virtual void reset();
/**
* Execute a list upon a given node. For each Axis encountered,