From 331f8500569df9b3b2aa776c5bcaad7b99c57295 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 7 Oct 2022 22:52:53 +1100 Subject: Cleanup: redundant parenthesis --- .../editors/space_buttons/buttons_context.c | 26 +++++++++++----------- .../editors/space_buttons/buttons_texture.c | 6 ++--- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'source/blender/editors/space_buttons') diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index c15fcc634dd..c5f457b3fd8 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -228,53 +228,53 @@ static bool buttons_context_path_data(ButsContextPath *path, int type) PointerRNA *ptr = &path->ptr[path->len - 1]; /* if we already have a data, we're done */ - if (RNA_struct_is_a(ptr->type, &RNA_Mesh) && (ELEM(type, -1, OB_MESH))) { + if (RNA_struct_is_a(ptr->type, &RNA_Mesh) && ELEM(type, -1, OB_MESH)) { return true; } if (RNA_struct_is_a(ptr->type, &RNA_Curve) && (type == -1 || ELEM(type, OB_CURVES_LEGACY, OB_SURF, OB_FONT))) { return true; } - if (RNA_struct_is_a(ptr->type, &RNA_Armature) && (ELEM(type, -1, OB_ARMATURE))) { + if (RNA_struct_is_a(ptr->type, &RNA_Armature) && ELEM(type, -1, OB_ARMATURE)) { return true; } - if (RNA_struct_is_a(ptr->type, &RNA_MetaBall) && (ELEM(type, -1, OB_MBALL))) { + if (RNA_struct_is_a(ptr->type, &RNA_MetaBall) && ELEM(type, -1, OB_MBALL)) { return true; } - if (RNA_struct_is_a(ptr->type, &RNA_Lattice) && (ELEM(type, -1, OB_LATTICE))) { + if (RNA_struct_is_a(ptr->type, &RNA_Lattice) && ELEM(type, -1, OB_LATTICE)) { return true; } - if (RNA_struct_is_a(ptr->type, &RNA_Camera) && (ELEM(type, -1, OB_CAMERA))) { + if (RNA_struct_is_a(ptr->type, &RNA_Camera) && ELEM(type, -1, OB_CAMERA)) { return true; } - if (RNA_struct_is_a(ptr->type, &RNA_Light) && (ELEM(type, -1, OB_LAMP))) { + if (RNA_struct_is_a(ptr->type, &RNA_Light) && ELEM(type, -1, OB_LAMP)) { return true; } - if (RNA_struct_is_a(ptr->type, &RNA_Speaker) && (ELEM(type, -1, OB_SPEAKER))) { + if (RNA_struct_is_a(ptr->type, &RNA_Speaker) && ELEM(type, -1, OB_SPEAKER)) { return true; } - if (RNA_struct_is_a(ptr->type, &RNA_LightProbe) && (ELEM(type, -1, OB_LIGHTPROBE))) { + if (RNA_struct_is_a(ptr->type, &RNA_LightProbe) && ELEM(type, -1, OB_LIGHTPROBE)) { return true; } - if (RNA_struct_is_a(ptr->type, &RNA_GreasePencil) && (ELEM(type, -1, OB_GPENCIL))) { + if (RNA_struct_is_a(ptr->type, &RNA_GreasePencil) && ELEM(type, -1, OB_GPENCIL)) { return true; } - if (RNA_struct_is_a(ptr->type, &RNA_Curves) && (ELEM(type, -1, OB_CURVES))) { + if (RNA_struct_is_a(ptr->type, &RNA_Curves) && ELEM(type, -1, OB_CURVES)) { return true; } #ifdef WITH_POINT_CLOUD - if (RNA_struct_is_a(ptr->type, &RNA_PointCloud) && (ELEM(type, -1, OB_POINTCLOUD))) { + if (RNA_struct_is_a(ptr->type, &RNA_PointCloud) && ELEM(type, -1, OB_POINTCLOUD)) { return true; } #endif - if (RNA_struct_is_a(ptr->type, &RNA_Volume) && (ELEM(type, -1, OB_VOLUME))) { + if (RNA_struct_is_a(ptr->type, &RNA_Volume) && ELEM(type, -1, OB_VOLUME)) { return true; } /* try to get an object in the path, no pinning supported here */ if (buttons_context_path_object(path)) { Object *ob = path->ptr[path->len - 1].data; - if (ob && (ELEM(type, -1, ob->type))) { + if (ob && ELEM(type, -1, ob->type)) { RNA_id_pointer_create(ob->data, &path->ptr[path->len]); path->len++; diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index d4e456272f9..8b04398c559 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -179,7 +179,7 @@ static void buttons_texture_modifier_geonodes_users_add(Object *ob, prop = RNA_struct_find_property(&ptr, "default_value"); PointerRNA texptr = RNA_property_pointer_get(&ptr, prop); - Tex *tex = (RNA_struct_is_a(texptr.type, &RNA_Texture)) ? (Tex *)texptr.data : NULL; + Tex *tex = RNA_struct_is_a(texptr.type, &RNA_Texture) ? (Tex *)texptr.data : NULL; if (tex != NULL) { buttons_texture_user_socket_property_add(users, &ob->id, @@ -414,7 +414,7 @@ void buttons_texture_context_compute(const bContext *C, SpaceProperties *sbuts) /* Get texture datablock pointer if it's a property. */ texptr = RNA_property_pointer_get(&ct->user->ptr, ct->user->prop); - tex = (RNA_struct_is_a(texptr.type, &RNA_Texture)) ? texptr.data : NULL; + tex = RNA_struct_is_a(texptr.type, &RNA_Texture) ? texptr.data : NULL; ct->texture = tex; } @@ -449,7 +449,7 @@ static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg) } if (user->ptr.data) { texptr = RNA_property_pointer_get(&user->ptr, user->prop); - tex = (RNA_struct_is_a(texptr.type, &RNA_Texture)) ? texptr.data : NULL; + tex = RNA_struct_is_a(texptr.type, &RNA_Texture) ? texptr.data : NULL; ct->texture = tex; -- cgit v1.2.3