[Bf-blender-cvs] [2c2129e] master: Correct warnings from recent cleanup

Campbell Barton noreply at git.blender.org
Fri Jan 8 06:50:18 CET 2016


Commit: 2c2129eb393b599f19dfe33a32c5dac822a62857
Author: Campbell Barton
Date:   Fri Jan 8 16:42:47 2016 +1100
Branches: master
https://developer.blender.org/rB2c2129eb393b599f19dfe33a32c5dac822a62857

Correct warnings from recent cleanup

===================================================================

M	source/blender/gpu/intern/gpu_material.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 6fc6331..485b048 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -733,7 +733,7 @@ static void shade_light_textures(GPUMaterial *mat, GPULamp *lamp, GPUNodeLink **
 		if (mtex && mtex->tex->type & TEX_IMAGE && mtex->tex->ima) {
 			mat->dynproperty |= DYN_LAMP_PERSMAT;
 
-			const float one = 1.0f;
+			float one = 1.0f;
 			GPUNodeLink *tex_rgb;
 
 			GPU_link(mat, "shade_light_texture",
@@ -752,7 +752,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
 	GPUMaterial *mat = shi->gpumat;
 	GPUNodeLink *lv, *dist, *is, *inp, *i;
 	GPUNodeLink *outcol, *specfac, *t, *shadfac = NULL, *lcol;
-	const float one = 1.0f;
+	float one = 1.0f;
 
 	if ((lamp->mode & LA_ONLYSHADOW) && !(ma->mode & MA_SHADOW))
 		return;
@@ -1066,7 +1066,7 @@ static void do_material_tex(GPUShadeInput *shi)
 	GPUNodeLink *texco_norm, *texco_orco, *texco_object;
 	GPUNodeLink *texco_global, *texco_uv = NULL;
 	GPUNodeLink *newnor, *orn;
-	const float one = 1.0f;
+	float one = 1.0f;
 	int rgbnor, talpha;
 	bool init_done = false;
 	int iBumpSpacePrev = 0; /* Not necessary, quieting gcc warning. */
@@ -1132,7 +1132,7 @@ static void do_material_tex(GPUShadeInput *shi)
 			if (mtex->size[0] != 1.0f || mtex->size[1] != 1.0f || mtex->size[2] != 1.0f)
 				GPU_link(mat, "mtex_mapping_size", texco, GPU_uniform(mtex->size), &texco);
 
-			const float ofs[3] = {
+			float ofs[3] = {
 				mtex->ofs[0] + 0.5f - 0.5f * mtex->size[0],
 				mtex->ofs[1] + 0.5f - 0.5f * mtex->size[1],
 				0.0f




More information about the Bf-blender-cvs mailing list