diff options
author | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2009-12-21 13:37:50 (GMT) |
---|---|---|
committer | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2009-12-21 13:37:50 (GMT) |
commit | 19ce714373bbf405e199e421e55673f1b8326ea7 (patch) | |
tree | 532b0aafb1306eb9a96eb3d6be90cf8cc4461d9a /src/gui | |
parent | 7956bfe376baddccaf1fd150ffc62cdd158c8030 (diff) | |
download | Qt-19ce714373bbf405e199e421e55673f1b8326ea7.zip Qt-19ce714373bbf405e199e421e55673f1b8326ea7.tar.gz Qt-19ce714373bbf405e199e421e55673f1b8326ea7.tar.bz2 |
Fixing compile error on armcc
armcc has issues with templated static inline functions, have to
remove "static" keyword
Reviewed-by: sroedal
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qpixmapfilter.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index caa0752..939b86d 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -602,7 +602,7 @@ QRectF QPixmapBlurFilter::boundingRectFor(const QRectF &rect) const } template <int shift> -static inline int static_shift(int value) +inline int qt_static_shift(int value) { if (shift == 0) return value; @@ -613,15 +613,15 @@ static inline int static_shift(int value) } template<int aprec, int zprec> -static inline void blurinner(uchar *bptr, int &zR, int &zG, int &zB, int &zA, int alpha) +inline void qt_blurinner(uchar *bptr, int &zR, int &zG, int &zB, int &zA, int alpha) { QRgb *pixel = (QRgb *)bptr; #define Z_MASK (0xff << zprec) - const int A_zprec = static_shift<zprec - 24>(*pixel) & Z_MASK; - const int R_zprec = static_shift<zprec - 16>(*pixel) & Z_MASK; - const int G_zprec = static_shift<zprec - 8>(*pixel) & Z_MASK; - const int B_zprec = static_shift<zprec>(*pixel) & Z_MASK; + const int A_zprec = qt_static_shift<zprec - 24>(*pixel) & Z_MASK; + const int R_zprec = qt_static_shift<zprec - 16>(*pixel) & Z_MASK; + const int G_zprec = qt_static_shift<zprec - 8>(*pixel) & Z_MASK; + const int B_zprec = qt_static_shift<zprec>(*pixel) & Z_MASK; #undef Z_MASK const int zR_zprec = zR >> aprec; @@ -636,17 +636,17 @@ static inline void blurinner(uchar *bptr, int &zR, int &zG, int &zB, int &zA, in #define ZA_MASK (0xff << (zprec + aprec)) *pixel = - static_shift<24 - zprec - aprec>(zA & ZA_MASK) - | static_shift<16 - zprec - aprec>(zR & ZA_MASK) - | static_shift<8 - zprec - aprec>(zG & ZA_MASK) - | static_shift<-zprec - aprec>(zB & ZA_MASK); + qt_static_shift<24 - zprec - aprec>(zA & ZA_MASK) + | qt_static_shift<16 - zprec - aprec>(zR & ZA_MASK) + | qt_static_shift<8 - zprec - aprec>(zG & ZA_MASK) + | qt_static_shift<-zprec - aprec>(zB & ZA_MASK); #undef ZA_MASK } const int alphaIndex = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3); template<int aprec, int zprec> -static inline void blurinner_alphaOnly(uchar *bptr, int &z, int alpha) +inline void qt_blurinner_alphaOnly(uchar *bptr, int &z, int alpha) { const int A_zprec = int(*(bptr)) << zprec; const int z_zprec = z >> aprec; @@ -655,7 +655,7 @@ static inline void blurinner_alphaOnly(uchar *bptr, int &z, int alpha) } template<int aprec, int zprec, bool alphaOnly> -static inline void blurrow(QImage & im, int line, int alpha) +inline void qt_blurrow(QImage & im, int line, int alpha) { uchar *bptr = im.scanLine(line); @@ -668,9 +668,9 @@ static inline void blurrow(QImage & im, int line, int alpha) const int im_width = im.width(); for (int index = 0; index < im_width; ++index) { if (alphaOnly) - blurinner_alphaOnly<aprec, zprec>(bptr, zA, alpha); + qt_blurinner_alphaOnly<aprec, zprec>(bptr, zA, alpha); else - blurinner<aprec, zprec>(bptr, zR, zG, zB, zA, alpha); + qt_blurinner<aprec, zprec>(bptr, zR, zG, zB, zA, alpha); bptr += stride; } @@ -679,9 +679,9 @@ static inline void blurrow(QImage & im, int line, int alpha) for (int index = im_width - 2; index >= 0; --index) { bptr -= stride; if (alphaOnly) - blurinner_alphaOnly<aprec, zprec>(bptr, zA, alpha); + qt_blurinner_alphaOnly<aprec, zprec>(bptr, zA, alpha); else - blurinner<aprec, zprec>(bptr, zR, zG, zB, zA, alpha); + qt_blurinner<aprec, zprec>(bptr, zR, zG, zB, zA, alpha); } } @@ -723,7 +723,7 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp int img_height = img.height(); for (int row = 0; row < img_height; ++row) { for (int i = 0; i <= improvedQuality; ++i) - blurrow<aprec, zprec, alphaOnly>(img, row, alpha); + qt_blurrow<aprec, zprec, alphaOnly>(img, row, alpha); } QImage temp(img.height(), img.width(), img.format()); @@ -756,7 +756,7 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp img_height = temp.height(); for (int row = 0; row < img_height; ++row) { for (int i = 0; i <= improvedQuality; ++i) - blurrow<aprec, zprec, alphaOnly>(temp, row, alpha); + qt_blurrow<aprec, zprec, alphaOnly>(temp, row, alpha); } if (transposed == 0) { |