summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-06-26 17:14:14 +0200
committerJason Barron <jbarron@trolltech.com>2009-06-29 14:09:14 +0200
commit1e84894225e31adf80a7a33da7f655fb5c38ea0e (patch)
tree79fb2f3315d0fae96c8986fb5ca66ffcf24e3edb
parentf1d3ed3a4adc2f1859102afb03b5c794d569940c (diff)
Work around crash with RVCT 2.2.
RVCT does not like this line of code for some reason, but doesn't seem to mind if it is expanded into multiple lines and the function pointer is initialized with an assignment operator.
-rw-r--r--src/gui/painting/qdrawhelper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 23fc1b17de..9f5bbc7168 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -657,7 +657,15 @@ Q_STATIC_TEMPLATE_FUNCTION
const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *, const QSpanData *data,
int y, int x, int length)
{
+#ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2
+ FetchPixelProc fetch;
+ if (format != QImage::Format_Invalid)
+ fetch = qt_fetchPixel<format>;
+ else
+ fetch = fetchPixelProc[data->texture.format];
+#else
FetchPixelProc fetch = (format != QImage::Format_Invalid) ? FetchPixelProc(qt_fetchPixel<format>) : fetchPixelProc[data->texture.format];
+#endif
int image_width = data->texture.width;
int image_height = data->texture.height;