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:
authorCampbell Barton <campbell@blender.org>2022-09-25 08:14:13 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 08:34:32 +0300
commitc9e35c2ced92082c86f1ecb9ecd16c6230218c7c (patch)
tree24bd862961d2bbfa022cfc3c5262cfe1e63550b3 /source/blender/draw/engines
parent865894481ce76325d817533c654bda2ce2e65c66 (diff)
Cleanup: remove redundant double parenthesis
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_pipeline.cc4
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_cache_utils.c2
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_shader_fx.c2
-rw-r--r--source/blender/draw/engines/workbench/workbench_data.c6
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_pipeline.cc b/source/blender/draw/engines/eevee_next/eevee_pipeline.cc
index 33978518ffc..21d1948f03c 100644
--- a/source/blender/draw/engines/eevee_next/eevee_pipeline.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_pipeline.cc
@@ -173,7 +173,7 @@ PassMain::Sub *ForwardPipeline::prepass_transparent_add(const Object *ob,
return nullptr;
}
DRWState state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL;
- if ((blender_mat->blend_flag & MA_BL_CULL_BACKFACE)) {
+ if (blender_mat->blend_flag & MA_BL_CULL_BACKFACE) {
state |= DRW_STATE_CULL_BACK;
}
float sorting_value = math::dot(float3(ob->obmat[3]), camera_forward_);
@@ -188,7 +188,7 @@ PassMain::Sub *ForwardPipeline::material_transparent_add(const Object *ob,
GPUMaterial *gpumat)
{
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_CUSTOM | DRW_STATE_DEPTH_LESS_EQUAL;
- if ((blender_mat->blend_flag & MA_BL_CULL_BACKFACE)) {
+ if (blender_mat->blend_flag & MA_BL_CULL_BACKFACE) {
state |= DRW_STATE_CULL_BACK;
}
float sorting_value = math::dot(float3(ob->obmat[3]), camera_forward_);
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
index ec44fdf42d5..a41918e7e0d 100644
--- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
@@ -49,7 +49,7 @@ GPENCIL_tObject *gpencil_object_cache_add(GPENCIL_PrivateData *pd, Object *ob)
for (int i = 0; i < tot_materials; i++) {
MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, i + 1);
if (((gp_style != NULL) && (gp_style->flag & GP_MATERIAL_IS_STROKE_HOLDOUT)) ||
- ((gp_style->flag & GP_MATERIAL_IS_FILL_HOLDOUT))) {
+ (gp_style->flag & GP_MATERIAL_IS_FILL_HOLDOUT)) {
tgp_ob->do_mat_holdout = true;
break;
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
index 7eb3569219d..a7d8570dbaa 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -98,7 +98,7 @@ static void gpencil_vfx_blur(BlurShaderFxData *fx, Object *ob, gpIterVfxData *it
DRW_view_persmat_get(NULL, persmat, false);
const float w = fabsf(mul_project_m4_v3_zfac(persmat, ob->obmat[3]));
- if ((fx->flag & FX_BLUR_DOF_MODE)) {
+ if (fx->flag & FX_BLUR_DOF_MODE) {
/* Compute circle of confusion size. */
float coc = (iter->pd->dof_params[0] / -w) - iter->pd->dof_params[1];
copy_v2_fl(blur_size, fabsf(coc));
diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c
index f7f156e5297..3ea0805b8f1 100644
--- a/source/blender/draw/engines/workbench/workbench_data.c
+++ b/source/blender/draw/engines/workbench/workbench_data.c
@@ -173,7 +173,7 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
if (!v3d || (v3d->shading.type == OB_RENDER && BKE_scene_uses_blender_workbench(scene))) {
short shading_flag = scene->display.shading.flag;
- if (XRAY_FLAG_ENABLED((&scene->display))) {
+ if (XRAY_FLAG_ENABLED(&scene->display)) {
/* Disable shading options that aren't supported in transparency mode. */
shading_flag &= ~(V3D_SHADING_SHADOW | V3D_SHADING_CAVITY | V3D_SHADING_DEPTH_OF_FIELD);
}
@@ -187,8 +187,8 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
wpd->shading = scene->display.shading;
wpd->shading.flag = shading_flag;
- if (XRAY_FLAG_ENABLED((&scene->display))) {
- wpd->shading.xray_alpha = XRAY_ALPHA((&scene->display));
+ if (XRAY_FLAG_ENABLED(&scene->display)) {
+ wpd->shading.xray_alpha = XRAY_ALPHA(&scene->display);
}
else {
wpd->shading.xray_alpha = 1.0f;