Cleanup: whitespace

This commit is contained in:
Campbell Barton 2018-06-01 18:10:43 +02:00
parent c0dd355926
commit 297bf7235b
10 changed files with 32 additions and 32 deletions

View File

@ -2970,7 +2970,7 @@ static void mesh_finalize_eval(Object *object)
/* Object is sometimes not evaluated!
* TODO(sergey): BAD TEMPORARY HACK FOR UNTIL WE ARE SMARTER */
if(object->id.tag & LIB_TAG_COPY_ON_WRITE) {
if (object->id.tag & LIB_TAG_COPY_ON_WRITE) {
object->data = mesh_eval;
}
else {

View File

@ -2970,7 +2970,7 @@ void BKE_animsys_update_driver_array(ID *id)
BLI_assert(!adt->driver_array);
int num_drivers = BLI_listbase_count(&adt->drivers);
adt->driver_array = MEM_mallocN(sizeof(FCurve*) * num_drivers, "adt->driver_array");
adt->driver_array = MEM_mallocN(sizeof(FCurve *) * num_drivers, "adt->driver_array");
int driver_index = 0;
for (FCurve *fcu = adt->drivers.first; fcu; fcu = fcu->next) {
@ -2990,7 +2990,7 @@ void BKE_animsys_eval_driver(Depsgraph *depsgraph,
/* Lookup driver, accelerated with driver array map. */
const AnimData *adt = BKE_animdata_from_id(id);
FCurve* fcu;
FCurve *fcu;
if (adt->driver_array) {
fcu = adt->driver_array[driver_index];

View File

@ -675,9 +675,9 @@ static uint *studiolight_irradiance_preview(StudioLight *sl, int icon_size)
studiolight_calculate_radiance(sl->equirectangular_irradiance_buffer, color, direction);
pixelresult = rgb_to_cpack(
linearrgb_to_srgb(color[0]),
linearrgb_to_srgb(color[1]),
linearrgb_to_srgb(color[2])) | alias_mask;
linearrgb_to_srgb(color[0]),
linearrgb_to_srgb(color[1]),
linearrgb_to_srgb(color[2])) | alias_mask;
}
rect[offset++] = pixelresult;
}

View File

@ -195,23 +195,23 @@ void mul_m4_m4m4_uniq(float R[4][4], const float A[4][4], const float B[4][4])
/* matrix product: R[j][k] = A[j][i] . B[i][k] */
#ifdef __SSE2__
__m128 A0 = _mm_loadu_ps(A[0]);
__m128 A1 = _mm_loadu_ps(A[1]);
__m128 A2 = _mm_loadu_ps(A[2]);
__m128 A3 = _mm_loadu_ps(A[3]);
__m128 A0 = _mm_loadu_ps(A[0]);
__m128 A1 = _mm_loadu_ps(A[1]);
__m128 A2 = _mm_loadu_ps(A[2]);
__m128 A3 = _mm_loadu_ps(A[3]);
for (int i = 0; i < 4; i++) {
__m128 B0 = _mm_set1_ps(B[i][0]);
__m128 B1 = _mm_set1_ps(B[i][1]);
__m128 B2 = _mm_set1_ps(B[i][2]);
__m128 B3 = _mm_set1_ps(B[i][3]);
for (int i = 0; i < 4; i++) {
__m128 B0 = _mm_set1_ps(B[i][0]);
__m128 B1 = _mm_set1_ps(B[i][1]);
__m128 B2 = _mm_set1_ps(B[i][2]);
__m128 B3 = _mm_set1_ps(B[i][3]);
__m128 sum = _mm_add_ps(
_mm_add_ps(_mm_mul_ps(B0, A0), _mm_mul_ps(B1, A1)),
_mm_add_ps(_mm_mul_ps(B2, A2), _mm_mul_ps(B3, A3)));
__m128 sum = _mm_add_ps(
_mm_add_ps(_mm_mul_ps(B0, A0), _mm_mul_ps(B1, A1)),
_mm_add_ps(_mm_mul_ps(B2, A2), _mm_mul_ps(B3, A3)));
_mm_storeu_ps(R[i], sum);
}
_mm_storeu_ps(R[i], sum);
}
#else
R[0][0] = B[0][0] * A[0][0] + B[0][1] * A[1][0] + B[0][2] * A[2][0] + B[0][3] * A[3][0];
R[0][1] = B[0][0] * A[0][1] + B[0][1] * A[1][1] + B[0][2] * A[2][1] + B[0][3] * A[3][1];

View File

@ -1501,7 +1501,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
if (mat->use_nodes) {
if (MAIN_VERSION_ATLEAST(main, 280, 0)) {
mat->roughness = mat->gloss_mir;
} else {
}
else {
mat->roughness = 0.25f;
}
}

View File

@ -93,7 +93,7 @@ Depsgraph::Depsgraph(Scene *scene,
mode(mode),
ctime(BKE_scene_frame_get(scene)),
scene_cow(NULL),
is_active(false)
is_active(false)
{
BLI_spin_init(&lock);
id_hash = BLI_ghash_ptr_new("Depsgraph id hash");

View File

@ -73,8 +73,7 @@ void workbench_private_data_get_light_direction(WORKBENCH_PrivateData *wpd, floa
if (STUDIOLIGHT_ORIENTATION_CAMERA_ENABLED(wpd)) {
int light_index = 0;
for (int index = 0 ; index < 3; index++)
{
for (int index = 0 ; index < 3; index++) {
SolidLight *sl = &U.light[index];
if (sl->flag) {
WORKBENCH_UBO_Light *light = &wd->lights[light_index++];
@ -105,16 +104,15 @@ void workbench_private_data_get_light_direction(WORKBENCH_PrivateData *wpd, floa
DRW_uniformbuffer_update(wpd->world_ubo, &wpd->world_data);
}
static void workbench_private_material_free(void* data)
static void workbench_private_material_free(void *data)
{
WORKBENCH_MaterialData *material_data = (WORKBENCH_MaterialData*)data;
WORKBENCH_MaterialData *material_data = data;
DRW_UBO_FREE_SAFE(material_data->material_ubo);
MEM_freeN(material_data);
}
void workbench_private_data_free(WORKBENCH_PrivateData *wpd)
{
BLI_ghash_free(wpd->material_hash, NULL, workbench_private_material_free);
DRW_UBO_FREE_SAFE(wpd->world_ubo);
}

View File

@ -548,7 +548,7 @@ void workbench_forward_draw_scene(WORKBENCH_Data *vedata)
/* Write Depth + Object ID */
GPU_framebuffer_bind(fbl->object_outline_fb);
DRW_draw_pass(psl->object_outline_pass);
if (wpd->shading.xray_alpha > 0.0) {
/* Shade */
GPU_framebuffer_bind(fbl->transparent_accum_fb);

View File

@ -4,7 +4,7 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -321,7 +321,7 @@ static void MPATH_draw_scene(void *vedata)
MPATH_PassList *psl = ((MPATH_Data *)vedata)->psl;
DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl)
DRW_draw_pass(psl->lines);

View File

@ -828,7 +828,7 @@ static void region_azone_tab_plus(ScrArea *sa, AZone *az, ARegion *ar)
}
/* rect needed for mouse pointer test */
BLI_rcti_init(&az->rect, az->x1, az->x2, az->y1, az->y2);
}
}
static void region_azone_edge_initialize(ScrArea *sa, ARegion *ar, AZEdge edge, const bool is_fullscreen)
{
@ -847,7 +847,8 @@ static void region_azone_edge_initialize(ScrArea *sa, ARegion *ar, AZEdge edge,
if (is_hidden) {
region_azone_tab_plus(sa, az, ar);
} else if (!is_hidden && (ar->regiontype != RGN_TYPE_HEADER)) {
}
else if (!is_hidden && (ar->regiontype != RGN_TYPE_HEADER)) {
region_azone_edge(az, ar);
}
}