QtOpenGL: Fix const correctness in old style casts
Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946886247a98a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
This commit is contained in:
parent
b798b53db7
commit
f43a624ab8
@ -1217,7 +1217,7 @@ void QGL2PaintEngineExPrivate::drawVertexArrays(const float *data, int *stops, i
|
||||
GLenum primitive)
|
||||
{
|
||||
// Now setup the pointer to the vertex array:
|
||||
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, (GLfloat*)data);
|
||||
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, data);
|
||||
|
||||
int previousStop = 0;
|
||||
for (int i=0; i<stopCount; ++i) {
|
||||
|
@ -2312,7 +2312,7 @@ static void convertToGLFormatHelper(QImage &dst, const QImage &img, GLenum textu
|
||||
qreal sy = target_height / qreal(img.height());
|
||||
|
||||
quint32 *dest = (quint32 *) dst.scanLine(0); // NB! avoid detach here
|
||||
uchar *srcPixels = (uchar *) img.scanLine(img.height() - 1);
|
||||
const uchar *srcPixels = img.constScanLine(img.height() - 1);
|
||||
int sbpl = img.bytesPerLine();
|
||||
int dbpl = dst.bytesPerLine();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user