[Bf-blender-cvs] [d7d2e71] master: Correct some errors in auto-cleanup

Campbell Barton noreply at git.blender.org
Sun Apr 27 14:03:09 CEST 2014


Commit: d7d2e71a037ca986fda9ba6f6d057a2d24ace4e0
Author: Campbell Barton
Date:   Sun Apr 27 22:02:25 2014 +1000
https://developer.blender.org/rBd7d2e71a037ca986fda9ba6f6d057a2d24ace4e0

Correct some errors in auto-cleanup

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

M	source/blender/blenkernel/intern/mesh_evaluate.c
M	source/blender/blenlib/intern/math_geom.c
M	source/blender/bmesh/intern/bmesh_edgeloop.c
M	source/blender/bmesh/intern/bmesh_polygon.c
M	source/blender/bmesh/operators/bmo_connect_nonplanar.c
M	source/blender/bmesh/tools/bmesh_bevel.c
M	source/blender/editors/mesh/editmesh_knife.c

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

diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index b272749..74e380c 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -172,8 +172,8 @@ static void mesh_calc_normals_poly_accum(MPoly *mp, MLoop *ml,
 	/* inline version of #BKE_mesh_calc_poly_normal, also does edge-vectors */
 	{
 		int i_prev = nverts - 1;
-		const float const *v_prev = mvert[ml[i_prev].v].co;
-		const float const *v_curr;
+		const float *v_prev = mvert[ml[i_prev].v].co;
+		const float *v_curr;
 
 		zero_v3(polyno);
 		/* Newell's Method */
@@ -738,8 +738,8 @@ static void mesh_calc_ngon_normal(MPoly *mpoly, MLoop *loopstart,
                                   MVert *mvert, float normal[3])
 {
 	const int nverts = mpoly->totloop;
-	const float const *v_prev = mvert[loopstart[nverts - 1].v].co;
-	const float const *v_curr;
+	const float *v_prev = mvert[loopstart[nverts - 1].v].co;
+	const float *v_curr;
 	int i;
 
 	zero_v3(normal);
@@ -788,8 +788,8 @@ static void mesh_calc_ngon_normal_coords(MPoly *mpoly, MLoop *loopstart,
                                          const float (*vertex_coords)[3], float normal[3])
 {
 	const int nverts = mpoly->totloop;
-	const float const *v_prev = vertex_coords[loopstart[nverts - 1].v];
-	const float const *v_curr;
+	const float *v_prev = vertex_coords[loopstart[nverts - 1].v];
+	const float *v_curr;
 	int i;
 
 	zero_v3(normal);
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 36b26f9..a128960 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -95,8 +95,8 @@ float normal_quad_v3(float n[3], const float v1[3], const float v2[3], const flo
  */
 float normal_poly_v3(float n[3], const float verts[][3], unsigned int nr)
 {
-	const float const *v_prev = verts[nr - 1];
-	const float const *v_curr = verts[0];
+	const float *v_prev = verts[nr - 1];
+	const float *v_curr = verts[0];
 	unsigned int i;
 
 	zero_v3(n);
diff --git a/source/blender/bmesh/intern/bmesh_edgeloop.c b/source/blender/bmesh/intern/bmesh_edgeloop.c
index 82c9f62..bbf4b66 100644
--- a/source/blender/bmesh/intern/bmesh_edgeloop.c
+++ b/source/blender/bmesh/intern/bmesh_edgeloop.c
@@ -544,9 +544,9 @@ void BM_edgeloop_calc_center(BMesh *UNUSED(bm), BMEdgeLoopStore *el_store)
 	LinkData *node_first = el_store->verts.first;
 	LinkData *node_next = node_first;
 
-	const float const *v_prev = NODE_AS_CO(node_prev);
-	const float const *v_curr = NODE_AS_CO(node_curr);
-	const float const *v_next = NODE_AS_CO(node_next);
+	const float *v_prev = NODE_AS_CO(node_prev);
+	const float *v_curr = NODE_AS_CO(node_curr);
+	const float *v_next = NODE_AS_CO(node_next);
 
 	float totw = 0.0f;
 	float w_prev;
@@ -582,8 +582,8 @@ void BM_edgeloop_calc_center(BMesh *UNUSED(bm), BMEdgeLoopStore *el_store)
 bool BM_edgeloop_calc_normal(BMesh *UNUSED(bm), BMEdgeLoopStore *el_store)
 {
 	LinkData *node_curr = el_store->verts.first;
-	const float const *v_prev = NODE_AS_CO(el_store->verts.last);
-	const float const *v_curr = NODE_AS_CO(node_curr);
+	const float *v_prev = NODE_AS_CO(el_store->verts.last);
+	const float *v_curr = NODE_AS_CO(node_curr);
 
 	zero_v3(el_store->no);
 
@@ -619,8 +619,8 @@ bool BM_edgeloop_calc_normal(BMesh *UNUSED(bm), BMEdgeLoopStore *el_store)
 bool BM_edgeloop_calc_normal_aligned(BMesh *UNUSED(bm), BMEdgeLoopStore *el_store, const float no_align[3])
 {
 	LinkData *node_curr = el_store->verts.first;
-	const float const *v_prev = NODE_AS_CO(el_store->verts.last);
-	const float const *v_curr = NODE_AS_CO(node_curr);
+	const float *v_prev = NODE_AS_CO(el_store->verts.last);
+	const float *v_curr = NODE_AS_CO(node_curr);
 
 	zero_v3(el_store->no);
 
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 06c32d3..1313f70 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -78,8 +78,8 @@ static void bm_face_calc_poly_normal(const BMFace *f, float n[3])
 {
 	BMLoop *l_first = BM_FACE_FIRST_LOOP(f);
 	BMLoop *l_iter  = l_first;
-	const float const *v_prev = l_first->prev->v->co;
-	const float const *v_curr = l_first->v->co;
+	const float *v_prev = l_first->prev->v->co;
+	const float *v_curr = l_first->v->co;
 
 	zero_v3(n);
 
@@ -109,8 +109,8 @@ static void bm_face_calc_poly_normal_vertex_cos(BMFace *f, float r_no[3],
 {
 	BMLoop *l_first = BM_FACE_FIRST_LOOP(f);
 	BMLoop *l_iter  = l_first;
-	const float const *v_prev = vertexCos[BM_elem_index_get(l_first->prev->v)];
-	const float const *v_curr = vertexCos[BM_elem_index_get(l_first->v)];
+	const float *v_prev = vertexCos[BM_elem_index_get(l_first->prev->v)];
+	const float *v_curr = vertexCos[BM_elem_index_get(l_first->v)];
 
 	zero_v3(r_no);
 
diff --git a/source/blender/bmesh/operators/bmo_connect_nonplanar.c b/source/blender/bmesh/operators/bmo_connect_nonplanar.c
index f30f166..15447c9 100644
--- a/source/blender/bmesh/operators/bmo_connect_nonplanar.c
+++ b/source/blender/bmesh/operators/bmo_connect_nonplanar.c
@@ -43,7 +43,7 @@
  */
 static bool bm_face_subset_calc_normal(BMLoop *l_first, BMLoop *l_last, float r_no[3])
 {
-	const float const *v_prev, *v_curr;
+	const float *v_prev, *v_curr;
 
 	/* Newell's Method */
 	BMLoop *l_iter = l_first;
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 867109a..70cd1ca 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -1375,7 +1375,7 @@ static void build_boundary(BevelParams *bp, BevVert *bv, bool construct)
 	BevVert *bvother;
 	VMesh *vm;
 	float co[3];
-	const float  *no;
+	const float *no;
 	float lastd;
 
 	vm = bv->vmesh;
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index cf25283..440c494 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -2934,7 +2934,7 @@ static void edvm_mesh_knife_face_point(BMFace *f, float r_cent[3])
 	unsigned int  (*index)[3] = BLI_array_alloca(index, tottri);
 	int j;
 
-	const float const *best_co[3] = {NULL};
+	const float *best_co[3] = {NULL};
 	float best_area  = -1.0f;
 	bool ok = false;




More information about the Bf-blender-cvs mailing list