diff options
author | Hans Goudey <h.goudey@me.com> | 2022-05-13 19:31:29 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-05-13 19:35:22 +0300 |
commit | cf69652618fefcd22b2cde9a2e0338b63f9a003e (patch) | |
tree | 013435f2e181f1332681bd513903c0cacf1baeda /source/blender/blenkernel/intern/mesh_tangent.c | |
parent | fa7224d8ed88fbfbf55e5d1a83cef49c309785cb (diff) |
Cleanup: Use const when retrieving custom data layers
Knowing when layers are retrieved for write access will be essential
when adding proper copy-on-write support. This commit makes that
clearer by adding `const` where the retrieved data is not modified.
Ref T95842
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_tangent.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_tangent.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/mesh_tangent.c b/source/blender/blenkernel/intern/mesh_tangent.c index f2e46c3bd92..16d76a75f2c 100644 --- a/source/blender/blenkernel/intern/mesh_tangent.c +++ b/source/blender/blenkernel/intern/mesh_tangent.c @@ -155,7 +155,7 @@ void BKE_mesh_calc_loop_tangent_single(Mesh *mesh, float (*r_looptangents)[4], ReportList *reports) { - MLoopUV *loopuvs; + const MLoopUV *loopuvs; float(*loopnors)[3]; /* Check we have valid texture coordinates first! */ @@ -205,10 +205,10 @@ typedef struct { const float (*precomputedFaceNormals)[3]; const float (*precomputedLoopNormals)[3]; const MLoopTri *looptri; - MLoopUV *mloopuv; /* texture coordinates */ - const MPoly *mpoly; /* indices */ - const MLoop *mloop; /* indices */ - const MVert *mvert; /* vertex coordinates */ + const MLoopUV *mloopuv; /* texture coordinates */ + const MPoly *mpoly; /* indices */ + const MLoop *mloop; /* indices */ + const MVert *mvert; /* vertex coordinates */ const float (*vert_normals)[3]; const float (*orco)[3]; float (*tangent)[4]; /* destination */ |