code cleanup: warnings and redundant checks.

This commit is contained in:
Campbell Barton 2013-09-08 20:25:31 +00:00
parent 5a6bcd1d42
commit 108a4c41c4
3 changed files with 8 additions and 11 deletions

@ -65,7 +65,7 @@ void bmo_poke_exec(BMesh *bm, BMOperator *op)
break;
default:
BLI_assert(0);
break;
return;
}
BMO_ITER (f, &oiter, op->slots_in, "faces", BM_FACE) {

@ -2317,9 +2317,7 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, const float lampco[3],
}
copy_v3_v3(isec->start, start);
isec->dir[0] = end[0]-isec->start[0];
isec->dir[1] = end[1]-isec->start[1];
isec->dir[2] = end[2]-isec->start[2];
sub_v3_v3v3(isec->dir, end, start);
isec->dist = normalize_v3(isec->dir);
if (shi->obi->flag & R_ENV_TRANSFORMED)

@ -205,8 +205,8 @@ void BL_ConvertActuators(const char* maggiename,
case ACT_ACTION:
{
bActionActuator* actact = (bActionActuator*) bact->data;
STR_String propname = (actact->name ? actact->name : "");
STR_String propframe = (actact->frameProp ? actact->frameProp : "");
STR_String propname = actact->name;
STR_String propframe = actact->frameProp;
short ipo_flags = 0;
@ -241,8 +241,8 @@ void BL_ConvertActuators(const char* maggiename,
{
if (blenderobject->type==OB_MESH) {
bActionActuator* actact = (bActionActuator*) bact->data;
STR_String propname = (actact->name ? actact->name : "");
STR_String propframe = (actact->frameProp ? actact->frameProp : "");
STR_String propname = actact->name;
STR_String propframe = actact->frameProp;
BL_ShapeActionActuator* tmpbaseact = new BL_ShapeActionActuator(
gameobj,
@ -748,9 +748,8 @@ void BL_ConvertActuators(const char* maggiename,
break;
};
if (sceneact->scene)
{
nextSceneName = sceneact->scene->id.name + 2; // this '2' is necessary to remove prefix 'SC'
if (sceneact->scene) {
nextSceneName = sceneact->scene->id.name + 2;
}
break;