From 1e84894225e31adf80a7a33da7f655fb5c38ea0e Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Fri, 26 Jun 2009 17:14:14 +0200 Subject: 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. --- src/gui/painting/qdrawhelper.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 23fc1b1..9f5bbc7 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; + else + fetch = fetchPixelProc[data->texture.format]; +#else FetchPixelProc fetch = (format != QImage::Format_Invalid) ? FetchPixelProc(qt_fetchPixel) : fetchPixelProc[data->texture.format]; +#endif int image_width = data->texture.width; int image_height = data->texture.height; -- cgit v0.12