summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/functions
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlpatterns/functions')
-rw-r--r--src/xmlpatterns/functions/qcomparingaggregator.cpp7
-rw-r--r--src/xmlpatterns/functions/qsequencefns_p.h15
2 files changed, 21 insertions, 1 deletions
diff --git a/src/xmlpatterns/functions/qcomparingaggregator.cpp b/src/xmlpatterns/functions/qcomparingaggregator.cpp
index bec8dea4a6..559b94480d 100644
--- a/src/xmlpatterns/functions/qcomparingaggregator.cpp
+++ b/src/xmlpatterns/functions/qcomparingaggregator.cpp
@@ -203,8 +203,13 @@ ComparingAggregator<oper, result>::typeCheck(const StaticContext::Ptr &context,
if(!m_operands.first()->staticType()->cardinality().allowsMany())
return m_operands.first();
-
+
+#if defined(Q_CC_RVCT)
+ // explicit scope needed in RVCT
+ ComparingAggregator<oper, result>::prepareComparison(fetchComparator(t1, t1, context));
+#else
prepareComparison(fetchComparator(t1, t1, context));
+#endif
return me;
}
diff --git a/src/xmlpatterns/functions/qsequencefns_p.h b/src/xmlpatterns/functions/qsequencefns_p.h
index 77aa10246b..18d280616e 100644
--- a/src/xmlpatterns/functions/qsequencefns_p.h
+++ b/src/xmlpatterns/functions/qsequencefns_p.h
@@ -146,13 +146,28 @@ namespace QPatternist
*/
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
{
+#if defined(Q_CC_RVCT) && !defined(QT_NO_DEBUG)
+ // RVCT doesn't like using template parameter in trinary operator when the trinary operator result is
+ // passed directly into another constructor.
+ bool tempAssert = (Id == IDExistsFN || Id == IDEmptyFN);
+ Q_ASSERT(tempAssert);
+#else
Q_ASSERT(Id == IDExistsFN || Id == IDEmptyFN);
+#endif
+
const Expression::Ptr me(FunctionCall::compress(context));
if(me != this)
return me;
+#if defined(Q_CC_RVCT)
+ // RVCT doesn't like using template parameter in trinary operator when the trinary operator result is
+ // passed directly into another constructor.
+ Expression::ID tempId = Id;
+ const Cardinality myCard((tempId == IDExistsFN) ? Cardinality::oneOrMore() : Cardinality::empty());
+#else
const Cardinality myCard((Id == IDExistsFN) ? Cardinality::oneOrMore() : Cardinality::empty());
+#endif
const Cardinality card(m_operands.first()->staticType()->cardinality());
if(myCard.isMatch(card))