summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns/expr/qevaluationcache.cpp
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2011-09-02 12:48:24 (GMT)
committerCasper van Donderen <casper.vandonderen@nokia.com>2011-09-02 12:48:24 (GMT)
commit8bb4d82aea6a8dda91d29351fed4ef2c332cbec4 (patch)
treee45bc84b39187cf9ed4b625c0ee1074865c46705 /src/xmlpatterns/expr/qevaluationcache.cpp
parent8cf2a609004344827518e2218be315f212738c36 (diff)
parent00ffa83f2dbe3b3019dc564d6b4447f83b5d655f (diff)
downloadQt-8bb4d82aea6a8dda91d29351fed4ef2c332cbec4.zip
Qt-8bb4d82aea6a8dda91d29351fed4ef2c332cbec4.tar.gz
Qt-8bb4d82aea6a8dda91d29351fed4ef2c332cbec4.tar.bz2
Merge remote-tracking branch 'mainline/4.7' into 4.7
Diffstat (limited to 'src/xmlpatterns/expr/qevaluationcache.cpp')
-rw-r--r--src/xmlpatterns/expr/qevaluationcache.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/xmlpatterns/expr/qevaluationcache.cpp b/src/xmlpatterns/expr/qevaluationcache.cpp
index 67109eb..3b6fc92 100644
--- a/src/xmlpatterns/expr/qevaluationcache.cpp
+++ b/src/xmlpatterns/expr/qevaluationcache.cpp
@@ -49,10 +49,9 @@ template<bool IsForGlobal>
EvaluationCache<IsForGlobal>::EvaluationCache(const Expression::Ptr &op,
const VariableDeclaration *varDecl,
const VariableSlotID aSlot) : SingleContainer(op)
- , m_declaration(varDecl)
+ , m_declarationUsedByMany(varDecl->usedByMany())
, m_varSlot(aSlot)
{
- Q_ASSERT(m_declaration);
Q_ASSERT(m_varSlot > -1);
}
@@ -199,7 +198,7 @@ Expression::Ptr EvaluationCache<IsForGlobal>::compress(const StaticContext::Ptr
if(m_operand->is(IDRangeVariableReference))
return m_operand;
- if(m_declaration->usedByMany())
+ if (m_declarationUsedByMany)
{
/* If it's only an atomic value an EvaluationCache is overkill. However,
* it's still needed for functions like fn:current-time() that must adhere to