[Bf-blender-cvs] [f3dd6b8] master: Cleanup: Some else if for attribute code.

Thomas Dinges noreply at git.blender.org
Mon May 12 10:21:21 CEST 2014


Commit: f3dd6b8df23f3634cafe8aa9fdf54b9cf3eac1c1
Author: Thomas Dinges
Date:   Mon May 12 10:20:20 2014 +0200
https://developer.blender.org/rBf3dd6b8df23f3634cafe8aa9fdf54b9cf3eac1c1

Cleanup: Some else if for attribute code.

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

M	intern/cycles/render/light.cpp
M	intern/cycles/render/scene.cpp

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

diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index a5e3fab..7bdb1fb 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 686a1bc..4f5ad43 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;




More information about the Bf-blender-cvs mailing list