Dmitry Timoshkov : wined3d: Make some data const.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Dec 14 14:23:54 CST 2006
Module: wine
Branch: master
Commit: 47ffd7ae956d2cd04d3d0558861e61157f79a36f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=47ffd7ae956d2cd04d3d0558861e61157f79a36f
Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date: Thu Dec 14 22:47:59 2006 +0800
wined3d: Make some data const.
---
dlls/wined3d/arb_program_shader.c | 4 ++--
dlls/wined3d/baseshader.c | 2 +-
dlls/wined3d/drawprim.c | 2 +-
dlls/wined3d/glsl_shader.c | 4 ++--
dlls/wined3d/swapchain.c | 2 +-
dlls/wined3d/vertexdeclaration.c | 4 ++--
dlls/wined3d/wined3d_private.h | 4 ++--
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 75c22f5..b4aa371 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -187,7 +187,7 @@ void shader_generate_arb_declarations(
max_constantsF, max_constantsF - 1);
}
-static const char* shift_tab[] = {
+static const char * const shift_tab[] = {
"dummy", /* 0 (none) */
"coefmul.x", /* 1 (x2) */
"coefmul.y", /* 2 (x4) */
@@ -361,7 +361,7 @@ static void vshader_program_add_param(SH
IWineD3DVertexShaderImpl* This = (IWineD3DVertexShaderImpl*) arg->shader;
/* oPos, oFog and oPts in D3D */
- static const char* hwrastout_reg_names[] = { "TMP_OUT", "TMP_FOG", "result.pointsize" };
+ static const char * const hwrastout_reg_names[] = { "TMP_OUT", "TMP_FOG", "result.pointsize" };
DWORD reg = param & WINED3DSP_REGNUM_MASK;
DWORD regtype = shader_get_regtype(param);
diff --git a/dlls/wined3d/baseshader.c b/dlls/wined3d/baseshader.c
index c1c162b..f87716a 100644
--- a/dlls/wined3d/baseshader.c
+++ b/dlls/wined3d/baseshader.c
@@ -502,7 +502,7 @@ void shader_dump_param(
int input) {
IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
- static const char* rastout_reg_names[] = { "oPos", "oFog", "oPts" };
+ static const char * const rastout_reg_names[] = { "oPos", "oFog", "oPts" };
char swizzle_reg_chars[4];
DWORD reg = param & WINED3DSP_REGNUM_MASK;
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 7dc33e0..a560084 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -149,7 +149,7 @@ static void init_materials(IWineD3DDevic
}
-static GLfloat invymat[16] = {
+static const GLfloat invymat[16] = {
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, -1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index b290f2f..dffc1aa 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -481,7 +481,7 @@ static void shader_glsl_add_param(
char *out_str);
/** Used for opcode modifiers - They multiply the result by the specified amount */
-static const char* shift_glsl_tab[] = {
+static const char * const shift_glsl_tab[] = {
"", /* 0 (none) */
"2.0 * ", /* 1 (x2) */
"4.0 * ", /* 2 (x4) */
@@ -596,7 +596,7 @@ static void shader_glsl_get_register_nam
SHADER_OPCODE_ARG* arg) {
/* oPos, oFog and oPts in D3D */
- const char* hwrastout_reg_names[] = { "gl_Position", "gl_FogFragCoord", "gl_PointSize" };
+ static const char * const hwrastout_reg_names[] = { "gl_Position", "gl_FogFragCoord", "gl_PointSize" };
DWORD reg = param & WINED3DSP_REGNUM_MASK;
DWORD regtype = shader_get_regtype(param);
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 865703d..1eb787a 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -564,7 +564,7 @@ static HRESULT WINAPI IWineD3DSwapChainI
}
-IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl =
+const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl =
{
/* IUnknown */
IWineD3DSwapChainImpl_QueryInterface,
diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c
index a512e81..1789646 100644
--- a/dlls/wined3d/vertexdeclaration.c
+++ b/dlls/wined3d/vertexdeclaration.c
@@ -61,7 +61,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_decl);
/** Vertex Shader Declaration 8 data types tokens */
#define MAX_VSHADER_DECL_TYPES 8
-static CONST char* VertexDecl8_DataTypes[] = {
+static const char * const VertexDecl8_DataTypes[] = {
"D3DVSDT_FLOAT1",
"D3DVSDT_FLOAT2",
"D3DVSDT_FLOAT3",
@@ -73,7 +73,7 @@ static CONST char* VertexDecl8_DataTypes
NULL
};
-static CONST char* VertexDecl8_Registers[] = {
+static const char * const VertexDecl8_Registers[] = {
"D3DVSDE_POSITION",
"D3DVSDE_BLENDWEIGHT",
"D3DVSDE_BLENDINDICES",
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index aaa7de7..2f5e887 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1242,7 +1242,7 @@ typedef struct WineQueryOcclusionData {
typedef struct IWineD3DSwapChainImpl
{
/*IUnknown part*/
- IWineD3DSwapChainVtbl *lpVtbl;
+ const IWineD3DSwapChainVtbl *lpVtbl;
LONG ref; /* Note: Ref counting not required */
IUnknown *parent;
@@ -1271,7 +1271,7 @@ typedef struct IWineD3DSwapChainImpl
Drawable drawable;
} IWineD3DSwapChainImpl;
-extern IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl;
+extern const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl;
/*****************************************************************************
* Utility function prototypes
More information about the wine-cvs
mailing list