Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-09-09 00:25:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-09 00:25:31 +0400
commit108a4c41c4ffc56db474c33bff1a8917310fca17 (patch)
tree935c3f14f517b0881949468d01ac3e4ee776163f /source
parent5a6bcd1d42f7498a91316232f70bf2d69fb4df2a (diff)
code cleanup: warnings and redundant checks.
Diffstat (limited to 'source')
-rw-r--r--source/blender/bmesh/operators/bmo_poke.c2
-rw-r--r--source/blender/render/intern/source/rayshade.c4
-rw-r--r--source/gameengine/Converter/KX_ConvertActuators.cpp13
3 files changed, 8 insertions, 11 deletions
diff --git a/source/blender/bmesh/operators/bmo_poke.c b/source/blender/bmesh/operators/bmo_poke.c
index de65f4767ff..26f20656478 100644
--- a/source/blender/bmesh/operators/bmo_poke.c
+++ b/source/blender/bmesh/operators/bmo_poke.c
@@ -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) {
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 838f73b5e83..768fd2cdcf5 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -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)
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index 9d8e9e85461..e9461a15578 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -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;