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/editors/object | |
parent | 3db67fd670535c0a709ec6e8204fcb730cd3eb0d (diff) |
Cleanup: declare arrays arrays where possible
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_remesh.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_transform.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index bc9bef4dc63..81b8cd70353 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -205,7 +205,7 @@ void ED_object_rotation_from_quat(float rot[3], const float viewquat[4], const c switch (align_axis) { case 'X': { /* Same as 'rv3d->viewinv[1]' */ - float axis_y[4] = {0.0f, 1.0f, 0.0f}; + const float axis_y[4] = {0.0f, 1.0f, 0.0f}; float quat_y[4], quat[4]; axis_angle_to_quat(quat_y, axis_y, M_PI_2); mul_qt_qtqt(quat, viewquat, quat_y); diff --git a/source/blender/editors/object/object_remesh.c b/source/blender/editors/object/object_remesh.c index 28f58a34814..8d8f01dd61a 100644 --- a/source/blender/editors/object/object_remesh.c +++ b/source/blender/editors/object/object_remesh.c @@ -406,7 +406,7 @@ static int voxel_size_edit_modal(bContext *C, wmOperator *op, const wmEvent *eve return OPERATOR_FINISHED; } - float mval[2] = {event->mval[0], event->mval[1]}; + const float mval[2] = {event->mval[0], event->mval[1]}; float d = cd->init_mval[0] - mval[0]; @@ -470,7 +470,7 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev BoundBox *bb = BKE_mesh_boundbox_get(cd->active_object); /* Indices of the Bounding Box faces. */ - int BB_faces[6][4] = { + const int BB_faces[6][4] = { {3, 0, 4, 7}, {1, 2, 6, 5}, {3, 2, 1, 0}, @@ -525,7 +525,7 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev float d_a[3], d_b[3]; float d_a_proj[2], d_b_proj[2]; float preview_plane_proj[4][3]; - float y_axis_proj[2] = {0.0f, 1.0f}; + const float y_axis_proj[2] = {0.0f, 1.0f}; mid_v3_v3v3(text_pos, cd->preview_plane[0], cd->preview_plane[2]); diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index f2d7ad3ac11..52b572fb0dd 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -1907,7 +1907,7 @@ static int object_transform_axis_target_modal(bContext *C, wmOperator *op, const for (int x = -ofs; x <= ofs; x += ofs / 2) { for (int y = -ofs; y <= ofs; y += ofs / 2) { if (x != 0 && y != 0) { - int mval_ofs[2] = {event->mval[0] + x, event->mval[1] + y}; + const int mval_ofs[2] = {event->mval[0] + x, event->mval[1] + y}; float n[3]; if (ED_view3d_depth_read_cached_normal(&xfd->vc, mval_ofs, n)) { add_v3_v3(normal, n); |