Fix a few issues found by coverity code scan in cycles code, nothing that caused

an actual bug as far as I can tell.
This commit is contained in:
Brecht Van Lommel 2013-07-14 13:19:57 +00:00
parent 83a172e40c
commit 08dc76b1ec
4 changed files with 7 additions and 3 deletions

@ -127,6 +127,7 @@ private:
use_surfaces(true),
use_hair(true),
use_viewport_visibility(false),
use_localview(false),
samples(0), bound_samples(false)
{}

@ -359,12 +359,15 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene)
case PASS_BACKGROUND:
kfilm->pass_background = kfilm->pass_stride;
kfilm->use_light_pass = 1;
break;
case PASS_AO:
kfilm->pass_ao = kfilm->pass_stride;
kfilm->use_light_pass = 1;
break;
case PASS_SHADOW:
kfilm->pass_shadow = kfilm->pass_stride;
kfilm->use_light_pass = 1;
break;
case PASS_NONE:
break;
}

@ -53,7 +53,7 @@ static void shade_background_pixels(Device *device, DeviceScene *dscene, int res
}
/* compute on device */
float4 *d_output_data = d_output.resize(width*height);
d_output.resize(width*height);
memset((void*)d_output.data_pointer, 0, d_output.memory_size());
device->const_copy_to("__data", &dscene->data, sizeof(dscene->data));
@ -82,7 +82,7 @@ static void shade_background_pixels(Device *device, DeviceScene *dscene, int res
device->mem_free(d_input);
device->mem_free(d_output);
d_output_data = reinterpret_cast<float4*>(d_output.data_pointer);
float4 *d_output_data = reinterpret_cast<float4*>(d_output.data_pointer);
pixels.resize(width*height);

@ -99,7 +99,7 @@ void LookupTables::remove_table(size_t offset)
for(table = lookup_tables.begin(); table != lookup_tables.end(); table++) {
if(table->offset == offset) {
lookup_tables.erase(table);
break;
return;
}
}