diff options
author | Hans Goudey <h.goudey@me.com> | 2022-10-12 18:08:10 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-10-12 18:08:10 +0300 |
commit | aa5ce2fcc1e349bdcb48a2f054d6179af293413f (patch) | |
tree | 2a32590f22e0537554db3bdb5ce062d6104f3602 /source/blender/blenkernel | |
parent | e38377d690daaad1d9935c8227447276458045e4 (diff) |
Cleanup: Use const vertex pointer argument
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_normals.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 0a000f4543a..0ff7f50f71c 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -490,7 +490,7 @@ void BKE_mesh_calc_normals(struct Mesh *me); * Called after calculating all modifiers. */ void BKE_mesh_ensure_normals_for_display(struct Mesh *mesh); -void BKE_mesh_calc_normals_looptri(struct MVert *mverts, +void BKE_mesh_calc_normals_looptri(const struct MVert *mverts, int numVerts, const struct MLoop *mloop, const struct MLoopTri *looptri, diff --git a/source/blender/blenkernel/intern/mesh_normals.cc b/source/blender/blenkernel/intern/mesh_normals.cc index e589aff1c73..76f2078e6c8 100644 --- a/source/blender/blenkernel/intern/mesh_normals.cc +++ b/source/blender/blenkernel/intern/mesh_normals.cc @@ -470,7 +470,7 @@ void BKE_mesh_calc_normals(Mesh *mesh) #endif } -void BKE_mesh_calc_normals_looptri(MVert *mverts, +void BKE_mesh_calc_normals_looptri(const MVert *mverts, int numVerts, const MLoop *mloop, const MLoopTri *looptri, @@ -508,7 +508,7 @@ void BKE_mesh_calc_normals_looptri(MVert *mverts, /* Following Mesh convention; we use vertex coordinate itself for normal in this case. */ for (int i = 0; i < numVerts; i++) { - MVert *mv = &mverts[i]; + const MVert *mv = &mverts[i]; float *no = tnorms[i]; if (UNLIKELY(normalize_v3(no) == 0.0f)) { |