diff options
Diffstat (limited to 'src/xmlpatterns/data')
-rw-r--r-- | src/xmlpatterns/data/qabstractfloatcasters.cpp | 10 | ||||
-rw-r--r-- | src/xmlpatterns/data/qschemanumeric.cpp | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/xmlpatterns/data/qabstractfloatcasters.cpp b/src/xmlpatterns/data/qabstractfloatcasters.cpp index 62477eb..2d20a49 100644 --- a/src/xmlpatterns/data/qabstractfloatcasters.cpp +++ b/src/xmlpatterns/data/qabstractfloatcasters.cpp @@ -63,9 +63,19 @@ template <const bool isDouble> Item BooleanToAbstractFloatCaster<isDouble>::castFrom(const Item &from, const QExplicitlySharedDataPointer<DynamicContext> &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; + if(from.template as<AtomicValue>()->evaluateEBV(context)) + return tempDouble ? toItem(CommonValues::DoubleOne) : toItem(CommonValues::FloatOne); + else + return tempDouble ? toItem(CommonValues::DoubleZero) : toItem(CommonValues::FloatZero); +#else if(from.template as<AtomicValue>()->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/data/qschemanumeric.cpp b/src/xmlpatterns/data/qschemanumeric.cpp index eb1a236..0f95c01 100644 --- a/src/xmlpatterns/data/qschemanumeric.cpp +++ b/src/xmlpatterns/data/qschemanumeric.cpp @@ -51,8 +51,7 @@ #include "qschemanumeric_p.h" /** - * @file - * @short Contains class Numeric. This file was originally called qnumeric.cpp, + * @file Contains class Numeric. This file was originally called qnumeric.cpp, * but was renamed to stay consistent with qschemanumeric_p.h */ |