Cleanup: Some else if for attribute code.

This commit is contained in:
Thomas Dinges 2014-05-12 10:20:20 +02:00
parent 7fb96ff00d
commit f3dd6b8df2
2 changed files with 3 additions and 4 deletions

@ -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);

@ -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;