diff options
author | Hans Goudey <h.goudey@me.com> | 2022-05-14 19:57:52 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-05-14 19:57:52 +0300 |
commit | ea5bfedb4925485192e40cab98f2d5f1d3fe5012 (patch) | |
tree | dc1acc6668f86e9a439eea673a76b4f387400c4d /source/blender/editors | |
parent | e1c8ef551fe2c4393d714822e5e74eb153fc7af2 (diff) |
Cleanup: Further use of const for retrieved custom data layers
Similar to cf69652618fefcd22b2cde9a2.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_ops.c | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index d4ed49de34a..295e62b1cc8 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -107,7 +107,7 @@ static void join_mesh_single(Depsgraph *depsgraph, /* vertex groups */ MDeformVert *dvert = CustomData_get(vdata, *vertofs, CD_MDEFORMVERT); - MDeformVert *dvert_src = CustomData_get(&me->vdata, 0, CD_MDEFORMVERT); + const MDeformVert *dvert_src = CustomData_get(&me->vdata, 0, CD_MDEFORMVERT); /* Remap to correct new vgroup indices, if needed. */ if (dvert_src) { @@ -255,7 +255,7 @@ static void join_mesh_single(Depsgraph *depsgraph, /* Face maps. */ int *fmap = CustomData_get(pdata, *polyofs, CD_FACEMAP); - int *fmap_src = CustomData_get(&me->pdata, 0, CD_FACEMAP); + const int *fmap_src = CustomData_get(&me->pdata, 0, CD_FACEMAP); /* Remap to correct new face-map indices, if needed. */ if (fmap_src) { diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 2fd8bc1ba3f..95a7c1d8dee 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -4084,7 +4084,7 @@ typedef struct { static void proj_paint_layer_clone_init(ProjPaintState *ps, ProjPaintLayerClone *layer_clone) { - MLoopUV *mloopuv_clone_base = NULL; + const MLoopUV *mloopuv_clone_base = NULL; /* use clone mtface? */ if (ps->do_layer_clone) { diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.c b/source/blender/editors/sculpt_paint/sculpt_ops.c index 9c4ae446125..8803c95aab1 100644 --- a/source/blender/editors/sculpt_paint/sculpt_ops.c +++ b/source/blender/editors/sculpt_paint/sculpt_ops.c @@ -637,7 +637,7 @@ static int vertex_to_loop_colors_exec(bContext *C, wmOperator *UNUSED(op)) if (MPropCol_layer_n == -1) { return OPERATOR_CANCELLED; } - MPropCol *vertcols = CustomData_get_layer_n(&mesh->vdata, CD_PROP_COLOR, MPropCol_layer_n); + const MPropCol *vertcols = CustomData_get_layer_n(&mesh->vdata, CD_PROP_COLOR, MPropCol_layer_n); const MLoop *loops = CustomData_get_layer(&mesh->ldata, CD_MLOOP); const MPoly *polys = CustomData_get_layer(&mesh->pdata, CD_MPOLY); @@ -711,7 +711,8 @@ static int loop_to_vertex_colors_exec(bContext *C, wmOperator *UNUSED(op)) if (mloopcol_layer_n == -1) { return OPERATOR_CANCELLED; } - MLoopCol *loopcols = CustomData_get_layer_n(&mesh->ldata, CD_PROP_BYTE_COLOR, mloopcol_layer_n); + const MLoopCol *loopcols = CustomData_get_layer_n( + &mesh->ldata, CD_PROP_BYTE_COLOR, mloopcol_layer_n); const int MPropCol_layer_n = CustomData_get_active_layer(&mesh->vdata, CD_PROP_COLOR); if (MPropCol_layer_n == -1) { |