diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-20 22:57:59 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-20 23:32:28 (GMT) |
commit | 7c594907d521bb29ecca1b953a4ceea49ec32dd4 (patch) | |
tree | 98d614193f484a9f62f3080de3b55b43888f6700 /src/multimedia/base | |
parent | 69e873e2bfae3fc028c21d93112a75008c3bb58b (diff) | |
download | Qt-7c594907d521bb29ecca1b953a4ceea49ec32dd4.zip Qt-7c594907d521bb29ecca1b953a4ceea49ec32dd4.tar.gz Qt-7c594907d521bb29ecca1b953a4ceea49ec32dd4.tar.bz2 |
Compile Qt in C++0x mode.
This is not valid in C++0x:
char str[] = { 128, 0 };
Because 128 cannot be represented in a char. The same applies to
conversion from int to qreal: it's a narrowing conversion, with
possible data loss.
More info: http://www2.research.att.com/~bs/C++0xFAQ.html#narrowing
Reviewed-by: Trust Me
Diffstat (limited to 'src/multimedia/base')
-rw-r--r-- | src/multimedia/base/qpaintervideosurface.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/multimedia/base/qpaintervideosurface.cpp b/src/multimedia/base/qpaintervideosurface.cpp index ed93fad..695dc73 100644 --- a/src/multimedia/base/qpaintervideosurface.cpp +++ b/src/multimedia/base/qpaintervideosurface.cpp @@ -782,10 +782,10 @@ QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::paint( }; const float v_array[] = { - target.left() , target.bottom() + 1, - target.right() + 1, target.bottom() + 1, - target.left() , target.top(), - target.right() + 1, target.top() + float(target.left()) , float(target.bottom() + 1), + float(target.right() + 1), float(target.bottom() + 1), + float(target.left()) , float(target.top()), + float(target.right() + 1), float(target.top()) }; glEnable(GL_FRAGMENT_PROGRAM_ARB); @@ -1100,34 +1100,34 @@ QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::paint( const GLfloat positionMatrix[4][4] = { { - /*(0,0)*/ wfactor * transform.m11() - transform.m13(), - /*(0,1)*/ hfactor * transform.m12() + transform.m13(), + /*(0,0)*/ GLfloat(wfactor * transform.m11() - transform.m13()), + /*(0,1)*/ GLfloat(hfactor * transform.m12() + transform.m13()), /*(0,2)*/ 0.0, - /*(0,3)*/ transform.m13() + /*(0,3)*/ GLfloat(transform.m13()) }, { - /*(1,0)*/ wfactor * transform.m21() - transform.m23(), - /*(1,1)*/ hfactor * transform.m22() + transform.m23(), + /*(1,0)*/ GLfloat(wfactor * transform.m21() - transform.m23()), + /*(1,1)*/ GLfloat(hfactor * transform.m22() + transform.m23()), /*(1,2)*/ 0.0, - /*(1,3)*/ transform.m23() + /*(1,3)*/ GLfloat(transform.m23()) }, { /*(2,0)*/ 0.0, /*(2,1)*/ 0.0, /*(2,2)*/ -1.0, /*(2,3)*/ 0.0 }, { - /*(3,0)*/ wfactor * transform.dx() - transform.m33(), - /*(3,1)*/ hfactor * transform.dy() + transform.m33(), + /*(3,0)*/ GLfloat(wfactor * transform.dx() - transform.m33()), + /*(3,1)*/ GLfloat(hfactor * transform.dy() + transform.m33()), /*(3,2)*/ 0.0, - /*(3,3)*/ transform.m33() + /*(3,3)*/ GLfloat(transform.m33()) } }; const GLfloat vertexCoordArray[] = { - target.left() , target.bottom() + 1, - target.right() + 1, target.bottom() + 1, - target.left() , target.top(), - target.right() + 1, target.top() + GLfloat(target.left()) , GLfloat(target.bottom() + 1), + GLfloat(target.right() + 1), GLfloat(target.bottom() + 1), + GLfloat(target.left()) , GLfloat(target.top()), + GLfloat(target.right() + 1), GLfloat(target.top()) }; const GLfloat txLeft = source.left() / m_frameSize.width(); |