wined3d: Cast-qual warnings fix (2 of 3)

Andrew Talbot Andrew.Talbot at talbotville.com
Fri Nov 24 08:15:06 CST 2006


Changelog:
    wined3d: Cast-qual warnings fix.

diff -urN a/dlls/wined3d/device.c b/dlls/wined3d/device.c
--- a/dlls/wined3d/device.c	2006-11-22 12:46:32.000000000 +0000
+++ b/dlls/wined3d/device.c	2006-11-24 12:59:28.000000000 +0000
@@ -2575,7 +2575,7 @@
         glMatrixMode(GL_MODELVIEW);
         checkGLcall("glMatrixMode(GL_MODELVIEW)");
         glPushMatrix();
-        glLoadMatrixf((float *)lpmatrix);
+        glLoadMatrixf((const float *)lpmatrix);
         checkGLcall("glLoadMatrixf(...)");
 
         /* Reset lights */
@@ -2630,7 +2630,7 @@
         FIXME("Unhandled transform state!!\n");
     }
 
-    multiply_matrix(&temp, mat, (WINED3DMATRIX *) pMatrix);
+    multiply_matrix(&temp, mat, (const WINED3DMATRIX *) pMatrix);
 
     /* Apply change via set transform - will reapply to eg. lights this way */
     return IWineD3DDeviceImpl_SetTransform(iface, State, &temp);
@@ -6721,7 +6721,7 @@
         int j;
 
         /* hopefully using pointer addtion will be quicker than using a point + j * rowoffset */
-        unsigned char* data =((unsigned char *)IWineD3DSurface_GetData(pSourceSurface)) + offset;
+        const unsigned char* data =((const unsigned char *)IWineD3DSurface_GetData(pSourceSurface)) + offset;
 
         for(j = destTop ; j < (srcHeight + destTop) ; j++){
 
diff -urN a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
--- a/dlls/wined3d/utils.c	2006-11-17 20:11:48.000000000 +0000
+++ b/dlls/wined3d/utils.c	2006-11-24 12:59:59.000000000 +0000
@@ -2450,7 +2450,7 @@
     }
 }
 
-void multiply_matrix(WINED3DMATRIX *dest, WINED3DMATRIX *src1, WINED3DMATRIX *src2) {
+void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED3DMATRIX *src2) {
     WINED3DMATRIX temp;
 
     /* Now do the multiplication 'by hand'.
diff -urN a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
--- a/dlls/wined3d/wined3d_private.h	2006-11-20 12:24:26.000000000 +0000
+++ b/dlls/wined3d/wined3d_private.h	2006-11-24 12:59:39.000000000 +0000
@@ -1272,7 +1272,7 @@
 int D3DFmtMakeGlCfg(WINED3DFORMAT BackBufferFormat, WINED3DFORMAT StencilBufferFormat, int *attribs, int* nAttribs, BOOL alternate);
 
 /* Math utils */
-void multiply_matrix(WINED3DMATRIX *dest, WINED3DMATRIX *src1, WINED3DMATRIX *src2);
+void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED3DMATRIX *src2);
 
 /*****************************************************************************
  * To enable calling of inherited functions, requires prototypes 



More information about the wine-patches mailing list