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
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2014-05-12 12:20:20 +0400
committerThomas Dinges <blender@dingto.org>2014-05-12 12:21:13 +0400
commitf3dd6b8df23f3634cafe8aa9fdf54b9cf3eac1c1 (patch)
tree550c59dfa501b3ed6687bec168464ab12fd3ffb8
parent7fb96ff00d4fe2764e4262b352e204e0d352be86 (diff)
Cleanup: Some else if for attribute code.
-rw-r--r--intern/cycles/render/light.cpp3
-rw-r--r--intern/cycles/render/scene.cpp4
2 files changed, 3 insertions, 4 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index a5e3fabb19d..7bdb1fbf8af 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -184,8 +184,7 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen
}
}
- size_t num_distribution = num_triangles;
- num_distribution += num_lights;
+ size_t num_distribution = num_triangles + num_lights;
/* emission area */
float4 *distribution = dscene->light_distribution.resize(num_distribution + 1);
diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp
index 686a1bc406e..4f5ad439520 100644
--- a/intern/cycles/render/scene.cpp
+++ b/intern/cycles/render/scene.cpp
@@ -236,9 +236,9 @@ bool Scene::need_global_attribute(AttributeStandard std)
{
if(std == ATTR_STD_UV)
return Pass::contains(film->passes, PASS_UV);
- if(std == ATTR_STD_MOTION_VERTEX_POSITION)
+ else if(std == ATTR_STD_MOTION_VERTEX_POSITION)
return need_motion() != MOTION_NONE;
- if(std == ATTR_STD_MOTION_VERTEX_NORMAL)
+ else if(std == ATTR_STD_MOTION_VERTEX_NORMAL)
return need_motion() == MOTION_BLUR;
return false;