diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 15:41:22 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 15:41:22 +0300 |
commit | 0419ee871ff960f62e28a2a9fed764f66c616d71 (patch) | |
tree | 4a114edf1d1af726575297e79e0c7f15a806000a /source/blender/editors/interface | |
parent | 21d77a417e17ac92bfc10dbd742c867d4019ce69 (diff) |
Cleanup: remove redundant parenthesis (especially with macros)
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_query.cc | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_region_popup.cc | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_utils.cc | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_query.cc b/source/blender/editors/interface/interface_query.cc index 63dc3017da0..8a940ce14ee 100644 --- a/source/blender/editors/interface/interface_query.cc +++ b/source/blender/editors/interface/interface_query.cc @@ -84,7 +84,7 @@ bool ui_but_is_interactive_ex(const uiBut *but, const bool labeledit, const bool return false; } if ((but->type == UI_BTYPE_TEXT) && - (ELEM(but->emboss, UI_EMBOSS_NONE, UI_EMBOSS_NONE_OR_STATUS)) && !labeledit) { + ELEM(but->emboss, UI_EMBOSS_NONE, UI_EMBOSS_NONE_OR_STATUS) && !labeledit) { return false; } if ((but->type == UI_BTYPE_LISTROW) && labeledit) { @@ -103,7 +103,7 @@ bool UI_but_is_utf8(const uiBut *but) { if (but->rnaprop) { const int subtype = RNA_property_subtype(but->rnaprop); - return !(ELEM(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME, PROP_BYTESTRING)); + return !ELEM(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME, PROP_BYTESTRING); } return !(but->flag & UI_BUT_NO_UTF8); } diff --git a/source/blender/editors/interface/interface_region_popup.cc b/source/blender/editors/interface/interface_region_popup.cc index daa46b150a3..e93bc4c4bfe 100644 --- a/source/blender/editors/interface/interface_region_popup.cc +++ b/source/blender/editors/interface/interface_region_popup.cc @@ -165,10 +165,10 @@ static void ui_popup_block_position(wmWindow *window, dir1 &= (UI_DIR_UP | UI_DIR_DOWN); } - if ((dir2 == 0) && (ELEM(dir1, UI_DIR_LEFT, UI_DIR_RIGHT))) { + if ((dir2 == 0) && ELEM(dir1, UI_DIR_LEFT, UI_DIR_RIGHT)) { dir2 = UI_DIR_DOWN; } - if ((dir2 == 0) && (ELEM(dir1, UI_DIR_UP, UI_DIR_DOWN))) { + if ((dir2 == 0) && ELEM(dir1, UI_DIR_UP, UI_DIR_DOWN)) { dir2 = UI_DIR_LEFT; } diff --git a/source/blender/editors/interface/interface_utils.cc b/source/blender/editors/interface/interface_utils.cc index 139d3c9353f..423eefce3f3 100644 --- a/source/blender/editors/interface/interface_utils.cc +++ b/source/blender/editors/interface/interface_utils.cc @@ -435,7 +435,7 @@ eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, /* Only buttons that can be edited as text. */ const bool use_activate_init = ((prop == prop_activate_init) && - (ELEM(type, PROP_STRING, PROP_INT, PROP_FLOAT))); + ELEM(type, PROP_STRING, PROP_INT, PROP_FLOAT)); if (use_activate_init) { uiLayoutSetActivateInit(col, true); |