[Bf-blender-cvs] [2445a904627] temp-vert-normals-cleanup: Cleanup: const, remove unnecessary function call

Hans Goudey noreply at git.blender.org
Mon Jan 3 21:09:13 CET 2022


Commit: 2445a904627fc2a8efbde0b22fb1b1e22364d57e
Author: Hans Goudey
Date:   Mon Jan 3 14:09:05 2022 -0600
Branches: temp-vert-normals-cleanup
https://developer.blender.org/rB2445a904627fc2a8efbde0b22fb1b1e22364d57e

Cleanup: const, remove unnecessary function call

===================================================================

M	source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
M	source/blender/modifiers/intern/MOD_solidify_extrude.c
M	source/blender/modifiers/intern/MOD_solidify_nonmanifold.c

===================================================================

diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
index 0947d1132b0..718065d735e 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
@@ -178,7 +178,6 @@ int OBJMesh::ith_smooth_group(const int poly_index) const
 
 void OBJMesh::ensure_mesh_normals() const
 {
-  BKE_mesh_ensure_normals(export_mesh_eval_);
   BKE_mesh_calc_normals_split(export_mesh_eval_);
 }
 
diff --git a/source/blender/modifiers/intern/MOD_solidify_extrude.c b/source/blender/modifiers/intern/MOD_solidify_extrude.c
index 992061668bf..fa8d08bf839 100644
--- a/source/blender/modifiers/intern/MOD_solidify_extrude.c
+++ b/source/blender/modifiers/intern/MOD_solidify_extrude.c
@@ -67,7 +67,7 @@ BLI_INLINE bool edgeref_is_init(const EdgeFaceRef *edge_ref)
  * \param poly_nors: Precalculated face normals.
  * \param r_vert_nors: Return vert normals.
  */
-static void mesh_calc_hq_normal(Mesh *mesh, float (*poly_nors)[3], float (*r_vert_nors)[3])
+static void mesh_calc_hq_normal(Mesh *mesh, const float (*poly_nors)[3], float (*r_vert_nors)[3])
 {
   int i, numVerts, numEdges, numPolys;
   MPoly *mpoly, *mp;
@@ -204,7 +204,7 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex
   int *edge_order = NULL;
 
   float(*vert_nors)[3] = NULL;
-  float(*poly_nors)[3] = NULL;
+  const float(*poly_nors)[3] = NULL;
 
   const bool need_poly_normals = (smd->flag & MOD_SOLIDIFY_NORMAL_CALC) ||
                                  (smd->flag & MOD_SOLIDIFY_EVEN) ||
diff --git a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c
index 9b634065cbe..c8c36262175 100644
--- a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c
+++ b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c
@@ -158,7 +158,6 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
   const uint numVerts = (uint)mesh->totvert;
   const uint numEdges = (uint)mesh->totedge;
   const uint numPolys = (uint)mesh->totpoly;
-  const uint numLoops = (uint)mesh->totloop;
 
   if (numPolys == 0 && numVerts != 0) {
     return mesh;



More information about the Bf-blender-cvs mailing list