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 <ideasman42@gmail.com>2019-04-16 13:09:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-16 13:09:34 +0300
commit758bb8c70d75ada6ea4d8317fa499bcd051e309b (patch)
treea73bdbc67402baeec1b58dbc7de3884a312a8592
parentf37a27b074607f044bdf8e54e7d92dfdac236a67 (diff)
Clenaup: odd use of ternary operators
-rw-r--r--source/blender/editors/interface/interface.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 098a1e7c8a2..b76be4cf4d8 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1706,7 +1706,7 @@ int ui_but_is_pushed_ex(uiBut *but, double *value)
int is_push = 0;
if (but->bit) {
- const bool state = ELEM(but->type, UI_BTYPE_TOGGLE_N, UI_BTYPE_ICON_TOGGLE_N, UI_BTYPE_CHECKBOX_N) ? false : true;
+ const bool state = !ELEM(but->type, UI_BTYPE_TOGGLE_N, UI_BTYPE_ICON_TOGGLE_N, UI_BTYPE_CHECKBOX_N);
int lvalue;
UI_GET_BUT_VALUE_INIT(but, *value);
lvalue = (int)*value;
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 4d1dd7eb1d6..4b714e03d3b 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -798,7 +798,7 @@ static void paint_draw_alpha_overlay(
{
/* Color means that primary brush texture is colored and
* secondary is used for alpha/mask control. */
- bool col = ELEM(mode, PAINT_MODE_TEXTURE_3D, PAINT_MODE_TEXTURE_2D, PAINT_MODE_VERTEX) ? true : false;
+ bool col = ELEM(mode, PAINT_MODE_TEXTURE_3D, PAINT_MODE_TEXTURE_2D, PAINT_MODE_VERTEX);
eOverlayControlFlags flags = BKE_paint_get_overlay_flags();
gpuPushAttr(GPU_DEPTH_BUFFER_BIT | GPU_BLEND_BIT);