diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-01-24 04:21:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-24 04:21:13 +0300 |
commit | 203d2c5029dcc654ad4ffee998cee68aa5cb69f1 (patch) | |
tree | a131852835fafa12e88f655d972a56080c29fe96 /source/blender | |
parent | 317425414203ce34e7d4f30caeb236b26a185ba4 (diff) |
Prevent accidental fall-through in switch
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_vectTransform.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 7cb2fc0622d..81f04f0ef22 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -416,7 +416,7 @@ void GPU_material_bind_uniforms( if (viewmat) { mul_m4_m4m4(localtoviewmat, viewmat, obmat); invert_m4_m4(invlocaltoviewmat, localtoviewmat); - GPU_shader_uniform_vector(shader, material->invlocaltoviewmatloc, 16, 1, (float*)invlocaltoviewmat); + GPU_shader_uniform_vector(shader, material->invlocaltoviewmatloc, 16, 1, (float *)invlocaltoviewmat); } } if (material->builtins & GPU_OBCOLOR) { diff --git a/source/blender/nodes/shader/nodes/node_shader_vectTransform.c b/source/blender/nodes/shader/nodes/node_shader_vectTransform.c index 38f143bdf09..d31a175b9b4 100644 --- a/source/blender/nodes/shader/nodes/node_shader_vectTransform.c +++ b/source/blender/nodes/shader/nodes/node_shader_vectTransform.c @@ -128,6 +128,7 @@ static GPUNodeLink *get_gpulink_matrix_from_to(short from, short to) case SHD_VECT_TRANSFORM_SPACE_CAMERA: return GPU_builtin(GPU_LOC_TO_VIEW_MATRIX); } + break; case SHD_VECT_TRANSFORM_SPACE_WORLD: switch (to) { case SHD_VECT_TRANSFORM_SPACE_WORLD: @@ -137,6 +138,7 @@ static GPUNodeLink *get_gpulink_matrix_from_to(short from, short to) case SHD_VECT_TRANSFORM_SPACE_OBJECT: return GPU_builtin(GPU_INVERSE_OBJECT_MATRIX); } + break; case SHD_VECT_TRANSFORM_SPACE_CAMERA: switch (to) { case SHD_VECT_TRANSFORM_SPACE_CAMERA: @@ -146,8 +148,9 @@ static GPUNodeLink *get_gpulink_matrix_from_to(short from, short to) case SHD_VECT_TRANSFORM_SPACE_OBJECT: return GPU_builtin(GPU_INVERSE_LOC_TO_VIEW_MATRIX); } + break; } - return 0; + return NULL; } static int gpu_shader_vect_transform(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) { |