diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-07 15:36:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-07 15:37:39 +0300 |
commit | b134434224254d4ac3fc73d023f2f6d914746690 (patch) | |
tree | b67d2c5aee982495d55848414c362665a37476b0 /source/blender/modifiers/intern | |
parent | 3db67fd670535c0a709ec6e8204fcb730cd3eb0d (diff) |
Cleanup: declare arrays arrays where possible
Diffstat (limited to 'source/blender/modifiers/intern')
4 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c index bdb1851906b..d3d2f891929 100644 --- a/source/blender/modifiers/intern/MOD_particleinstance.c +++ b/source/blender/modifiers/intern/MOD_particleinstance.c @@ -442,7 +442,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * float angle = 2.0f * M_PI * (pimd->rotation + pimd->random_rotation * (psys_frand(psys, 19957323 + p) - 0.5f)); - float eul[3] = {0.0f, 0.0f, angle}; + const float eul[3] = {0.0f, 0.0f, angle}; float rot[4]; eul_to_quat(rot, eul); diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index b9bb7add811..3bb7ecd43f4 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -301,7 +301,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * float totlen = len_v3(mtx_tx[3]); if (totlen != 0.0f) { - float zero[3] = {0.0f, 0.0f, 0.0f}; + const float zero[3] = {0.0f, 0.0f, 0.0f}; float cp[3]; screw_ofs = closest_to_line_v3(cp, mtx_tx[3], zero, axis_vec); } @@ -412,7 +412,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * CustomData_copy_data(&mesh->vdata, &result->vdata, 0, 0, (int)totvert); if (mloopuv_layers_tot) { - float zero_co[3] = {0}; + const float zero_co[3] = {0}; plane_from_point_normal_v3(uv_axis_plane, zero_co, axis_vec); } diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c index c69d78f112f..962e93be215 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -449,7 +449,7 @@ BLI_INLINE SDefBindWeightData *computeBindWeights(SDefBindCalcData *const data, SDefBindWeightData *bwdata; SDefBindPoly *bpoly; - float world[3] = {0.0f, 0.0f, 1.0f}; + const float world[3] = {0.0f, 0.0f, 1.0f}; float avg_point_dist = 0.0f; float tot_weight = 0.0f; int inf_weight_flags = 0; diff --git a/source/blender/modifiers/intern/MOD_uvwarp.c b/source/blender/modifiers/intern/MOD_uvwarp.c index 4aca3c28ed8..f7d05501b84 100644 --- a/source/blender/modifiers/intern/MOD_uvwarp.c +++ b/source/blender/modifiers/intern/MOD_uvwarp.c @@ -185,7 +185,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * mul_m4_m4m4(warp_mat, mat_cent, warp_mat); } - int shuf_indices[4] = {axis_u, axis_v, -1, 3}; + const int shuf_indices[4] = {axis_u, axis_v, -1, 3}; shuffle_m4(shuf_mat, shuf_indices); mul_m4_m4m4(warp_mat, shuf_mat, warp_mat); transpose_m4(shuf_mat); |