diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-27 01:50:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-27 02:56:54 +0400 |
commit | b6e967be636d0e1bae842b2c52c76fd867a4784a (patch) | |
tree | fb1d7430f6bab8b1375019e8b585c850214e5992 /source/blender/editors/mesh | |
parent | 7ca74fc1c008355b84c08bcadb56ea6acabce2f3 (diff) |
Code cleanup: const args and arrays
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_loopcut.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 9a02a9761b0..e52ec8d74f5 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -493,7 +493,7 @@ static int loopcut_init(bContext *C, wmOperator *op, const wmEvent *event) { Scene *scene = CTX_data_scene(C); ToolSettings *settings = scene->toolsettings; - int mesh_select_mode[3] = { + const int mesh_select_mode[3] = { (settings->selectmode & SCE_SELECT_VERTEX) != 0, (settings->selectmode & SCE_SELECT_EDGE) != 0, (settings->selectmode & SCE_SELECT_FACE) != 0, diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 8b72e153852..d2648bf1c4e 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -1261,9 +1261,11 @@ void EDBM_mesh_reveal(BMEditMesh *em) BM_EDGES_OF_MESH, BM_FACES_OF_MESH}; - int sels[3] = {(em->selectmode & SCE_SELECT_VERTEX), - (em->selectmode & SCE_SELECT_EDGE), - (em->selectmode & SCE_SELECT_FACE), }; + const bool sels[3] = { + (em->selectmode & SCE_SELECT_VERTEX) != 0, + (em->selectmode & SCE_SELECT_EDGE) != 0, + (em->selectmode & SCE_SELECT_FACE) != 0, + }; int i; /* Use tag flag to remember what was hidden before all is revealed. |