Cleanup: Use const vertex pointer argument

This commit is contained in:
Hans Goudey 2022-10-12 10:08:10 -05:00
parent e38377d690
commit aa5ce2fcc1
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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)) {