code cleanup: minor style change & quiet warning, also add assert for BM_vert_splice() to check for invalid use.

This commit is contained in:
Campbell Barton 2012-10-19 03:07:58 +00:00
parent 5ad61e9642
commit 9b07c98bb4
3 changed files with 23 additions and 19 deletions

@ -25,8 +25,7 @@ shader node_rgb_ramp(
float Fac = 0.0,
output color Color = color(0.0, 0.0, 0.0),
output float Alpha = 1.0
)
output float Alpha = 1.0)
{
float f = clamp(Fac, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1);

@ -1607,10 +1607,10 @@ BMEdge *bmesh_jekv(BMesh *bm, BMEdge *ke, BMVert *kv, const short check_edge_dou
BMESH_ASSERT(edok != FALSE);
}
/* deallocate edg */
/* deallocate edge */
bm_kill_only_edge(bm, ke);
/* deallocate verte */
/* deallocate vertex */
bm_kill_only_vert(bm, kv);
/* Validate disk cycle lengths of ov, tv are unchanged */
@ -1619,7 +1619,7 @@ BMEdge *bmesh_jekv(BMesh *bm, BMEdge *ke, BMVert *kv, const short check_edge_dou
edok = bmesh_disk_validate(valence2, tv->e, tv);
BMESH_ASSERT(edok != FALSE);
/* Validate loop cycle of all faces attached to oe */
/* Validate loop cycle of all faces attached to 'oe' */
for (i = 0, l = oe->l; i < radlen; i++, l = l->radial_next) {
BMESH_ASSERT(l->e == oe);
edok = bmesh_verts_in_edge(l->v, l->next->v, oe);
@ -1800,6 +1800,10 @@ BMFace *bmesh_jfke(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e)
* Merges two verts into one (\a v into \a vtarget).
*
* \return Success
*
* \warning This does't work for collapsing edges,
* where \a v and \a vtarget are connected by an edge
* (assert checks for this case).
*/
int BM_vert_splice(BMesh *bm, BMVert *v, BMVert *vtarget)
{
@ -1827,6 +1831,7 @@ int BM_vert_splice(BMesh *bm, BMVert *v, BMVert *vtarget)
bmesh_disk_edge_remove(e, v);
bmesh_edge_swapverts(e, v, vtarget);
bmesh_disk_edge_append(e, vtarget);
BLI_assert(e->v1 != e->v2);
}
BM_CHECK_ELEMENT(v);

@ -131,7 +131,7 @@ static void deformVerts(ModifierData *md, Object *ob,
ParticleSystemModifierData *psmd = (ParticleSystemModifierData *) md;
ParticleSystem *psys = NULL;
int needsFree = 0;
float cfra = BKE_scene_frame_get(md->scene);
/* float cfra = BKE_scene_frame_get(md->scene); */ /* UNUSED */
if (ob->particlesystem.first)
psys = psmd->psys;