Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-05-14 19:57:52 +0300
committerHans Goudey <h.goudey@me.com>2022-05-14 19:57:52 +0300
commitea5bfedb4925485192e40cab98f2d5f1d3fe5012 (patch)
treedc1acc6668f86e9a439eea673a76b4f387400c4d /source/blender/blenkernel/intern/mesh_evaluate.cc
parente1c8ef551fe2c4393d714822e5e74eb153fc7af2 (diff)
Cleanup: Further use of const for retrieved custom data layers
Similar to cf69652618fefcd22b2cde9a2.
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_evaluate.cc')
-rw-r--r--source/blender/blenkernel/intern/mesh_evaluate.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.cc b/source/blender/blenkernel/intern/mesh_evaluate.cc
index ec2660a0145..30b1e580b29 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.cc
+++ b/source/blender/blenkernel/intern/mesh_evaluate.cc
@@ -644,7 +644,7 @@ static void bm_corners_to_loops_ex(ID *id,
MFace *mf = mface + findex;
for (int i = 0; i < numTex; i++) {
- MTFace *texface = (MTFace *)CustomData_get_n(fdata, CD_MTFACE, findex, i);
+ const MTFace *texface = (const MTFace *)CustomData_get_n(fdata, CD_MTFACE, findex, i);
MLoopUV *mloopuv = (MLoopUV *)CustomData_get_n(ldata, CD_MLOOPUV, loopstart, i);
copy_v2_v2(mloopuv->uv, texface->uv[0]);
@@ -662,7 +662,7 @@ static void bm_corners_to_loops_ex(ID *id,
for (int i = 0; i < numCol; i++) {
MLoopCol *mloopcol = (MLoopCol *)CustomData_get_n(ldata, CD_PROP_BYTE_COLOR, loopstart, i);
- MCol *mcol = (MCol *)CustomData_get_n(fdata, CD_MCOL, findex, i);
+ const MCol *mcol = (const MCol *)CustomData_get_n(fdata, CD_MCOL, findex, i);
MESH_MLOOPCOL_FROM_MCOL(mloopcol, &mcol[0]);
mloopcol++;
@@ -678,7 +678,7 @@ static void bm_corners_to_loops_ex(ID *id,
if (CustomData_has_layer(fdata, CD_TESSLOOPNORMAL)) {
float(*lnors)[3] = (float(*)[3])CustomData_get(ldata, loopstart, CD_NORMAL);
- short(*tlnors)[3] = (short(*)[3])CustomData_get(fdata, findex, CD_TESSLOOPNORMAL);
+ const short(*tlnors)[3] = (short(*)[3])CustomData_get(fdata, findex, CD_TESSLOOPNORMAL);
const int max = mf->v4 ? 4 : 3;
for (int i = 0; i < max; i++, lnors++, tlnors++) {
@@ -688,8 +688,8 @@ static void bm_corners_to_loops_ex(ID *id,
if (CustomData_has_layer(fdata, CD_MDISPS)) {
MDisps *ld = (MDisps *)CustomData_get(ldata, loopstart, CD_MDISPS);
- MDisps *fd = (MDisps *)CustomData_get(fdata, findex, CD_MDISPS);
- float(*disps)[3] = fd->disps;
+ const MDisps *fd = (const MDisps *)CustomData_get(fdata, findex, CD_MDISPS);
+ const float(*disps)[3] = fd->disps;
int tot = mf->v4 ? 4 : 3;
int corners;