[Bf-blender-cvs] [f0b5a9da017] blender2.8: Cleanup: style, unused

Campbell Barton noreply at git.blender.org
Mon Nov 19 23:18:49 CET 2018


Commit: f0b5a9da017a00c094cb7ab8bd0aa289c921a117
Author: Campbell Barton
Date:   Tue Nov 20 08:53:00 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBf0b5a9da017a00c094cb7ab8bd0aa289c921a117

Cleanup: style, unused

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

M	source/blender/blenkernel/intern/studiolight.c
M	source/blender/draw/engines/workbench/workbench_studiolight.c
M	source/blender/python/gpu/gpu_py_offscreen.c

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

diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c
index 736a06a3148..ce7372dc0b9 100644
--- a/source/blender/blenkernel/intern/studiolight.c
+++ b/source/blender/blenkernel/intern/studiolight.c
@@ -200,7 +200,7 @@ static void equirect_to_direction(float r[3], float u, float v)
 	r[2] = cosf(theta);
 }
 
-static void direction_to_cube_face_uv(float r_uv[2], int *r_face, const float dir[3])
+static void UNUSED_FUNCTION(direction_to_cube_face_uv)(float r_uv[2], int *r_face, const float dir[3])
 {
 	if (fabsf(dir[0]) > fabsf(dir[1]) && fabsf(dir[0]) > fabsf(dir[2])) {
 		bool is_pos = (dir[0] > 0.0f);
diff --git a/source/blender/draw/engines/workbench/workbench_studiolight.c b/source/blender/draw/engines/workbench/workbench_studiolight.c
index 65732b52471..901260d0660 100644
--- a/source/blender/draw/engines/workbench/workbench_studiolight.c
+++ b/source/blender/draw/engines/workbench/workbench_studiolight.c
@@ -41,18 +41,20 @@ void studiolight_update_world(StudioLight *sl, WORKBENCH_UBO_World *wd)
 	mul_v3_v3fl(wd->spherical_harmonics_coefs[0], sl->spherical_harmonics_coefs[0], M_1_PI);
 	/* Swizzle to make shader code simpler. */
 	for (int i = 0; i < 3; ++i) {
-		copy_v3_fl3(wd->spherical_harmonics_coefs[i+1], -sl->spherical_harmonics_coefs[3][i],
-		                                                 sl->spherical_harmonics_coefs[2][i],
-		                                                -sl->spherical_harmonics_coefs[1][i]);
-		mul_v3_fl(wd->spherical_harmonics_coefs[i+1], M_1_PI * 1.5f); /* 1.5f is to improve the contrast a bit. */
+		copy_v3_fl3(
+		        wd->spherical_harmonics_coefs[i + 1],
+		        -sl->spherical_harmonics_coefs[3][i],
+		        sl->spherical_harmonics_coefs[2][i],
+		        -sl->spherical_harmonics_coefs[1][i]);
+		mul_v3_fl(wd->spherical_harmonics_coefs[i + 1], M_1_PI * 1.5f); /* 1.5f is to improve the contrast a bit. */
 	}
 
 	/* Precompute as much as we can. See shader code for derivation. */
 	float len_r1[3], lr1_r0[3], p[3], a[3];
 	for (int i = 0; i < 3; ++i) {
-		mul_v3_fl(wd->spherical_harmonics_coefs[i+1], 0.5f);
-		len_r1[i] = len_v3(wd->spherical_harmonics_coefs[i+1]);
-		mul_v3_fl(wd->spherical_harmonics_coefs[i+1], 1.0f / len_r1[i]);
+		mul_v3_fl(wd->spherical_harmonics_coefs[i + 1], 0.5f);
+		len_r1[i] = len_v3(wd->spherical_harmonics_coefs[i + 1]);
+		mul_v3_fl(wd->spherical_harmonics_coefs[i + 1], 1.0f / len_r1[i]);
 	}
 	/* lr1_r0 = lenR1 / R0; */
 	copy_v3_v3(lr1_r0, wd->spherical_harmonics_coefs[0]);
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c
index 5fff75dec6b..c51a356d900 100644
--- a/source/blender/python/gpu/gpu_py_offscreen.c
+++ b/source/blender/python/gpu/gpu_py_offscreen.c
@@ -289,7 +289,7 @@ static PyObject *bpygpu_offscreen_free(BPyGPUOffScreen *self)
 	Py_RETURN_NONE;
 }
 
-static PyObject *bpygpu_offscreen_bind_context_enter(BPyGPUOffScreen *self)
+static PyObject *bpygpu_offscreen_bind_context_enter(BPyGPUOffScreen *UNUSED(self))
 {
 	Py_RETURN_NONE;
 }



More information about the Bf-blender-cvs mailing list