From aa5ce2fcc1e349bdcb48a2f054d6179af293413f Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 12 Oct 2022 10:08:10 -0500 Subject: Cleanup: Use const vertex pointer argument --- source/blender/blenkernel/BKE_mesh.h | 2 +- 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)) { -- cgit v1.2.3