From 7f43e476169bdc5b4b29dae4b49642f5e542c0aa Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 19 Aug 2009 10:30:16 +0300 Subject: Fixed xmlpatterns review comments. In comments it was stated that RVCT version is just fine for all platforms and ifdef are not needed. Also the compilers will really optimize extra temp variables for the other compilers. Reviewed-by: Janne Koskinen --- src/xmlpatterns/data/qabstractfloatcasters.cpp | 7 ------- src/xmlpatterns/functions/qcomparingaggregator.cpp | 4 ---- src/xmlpatterns/functions/qsequencefns_p.h | 8 -------- 3 files changed, 19 deletions(-) diff --git a/src/xmlpatterns/data/qabstractfloatcasters.cpp b/src/xmlpatterns/data/qabstractfloatcasters.cpp index cdbeb67..f41bb4a 100644 --- a/src/xmlpatterns/data/qabstractfloatcasters.cpp +++ b/src/xmlpatterns/data/qabstractfloatcasters.cpp @@ -63,7 +63,6 @@ template Item BooleanToAbstractFloatCaster::castFrom(const Item &from, const QExplicitlySharedDataPointer &context) const { -#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. bool tempDouble = isDouble; @@ -71,11 +70,5 @@ Item BooleanToAbstractFloatCaster::castFrom(const Item &from, return tempDouble ? toItem(CommonValues::DoubleOne) : toItem(CommonValues::FloatOne); else return tempDouble ? toItem(CommonValues::DoubleZero) : toItem(CommonValues::FloatZero); -#else - if(from.template as()->evaluateEBV(context)) - return isDouble ? toItem(CommonValues::DoubleOne) : toItem(CommonValues::FloatOne); - else - return isDouble ? toItem(CommonValues::DoubleZero) : toItem(CommonValues::FloatZero); -#endif } diff --git a/src/xmlpatterns/functions/qcomparingaggregator.cpp b/src/xmlpatterns/functions/qcomparingaggregator.cpp index 559b944..4fbb070 100644 --- a/src/xmlpatterns/functions/qcomparingaggregator.cpp +++ b/src/xmlpatterns/functions/qcomparingaggregator.cpp @@ -204,12 +204,8 @@ ComparingAggregator::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::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 18d2806..f16462f 100644 --- a/src/xmlpatterns/functions/qsequencefns_p.h +++ b/src/xmlpatterns/functions/qsequencefns_p.h @@ -146,28 +146,20 @@ 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)) -- cgit v0.12