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>2012-03-26 02:35:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-26 02:35:18 +0400
commit6faeac9fe2867aca9c111e4f86f74912c115eddd (patch)
treef6422a603ed6546fa5251582d83151f8415e657b /source/blender/editors/interface
parentaede928bdc7902bb81ebb00b286dc5064cf54dd6 (diff)
style cleanup: add braces around checks - 'if ELEM() {...}', confuses some parsers that done expand macros.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_handlers.c6
-rw-r--r--source/blender/editors/interface/interface_widgets.c2
-rw-r--r--source/blender/editors/interface/view2d.c4
3 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 21c3f4ca038..ce437fde69e 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -344,8 +344,8 @@ static void ui_apply_autokey_undo(bContext *C, uiBut *but)
const char *str= NULL;
/* define which string to use for undo */
- if ELEM(but->type, LINK, INLINK) str= "Add button link";
- else if ELEM(but->type, MENU, ICONTEXTROW) str= but->drawstr;
+ if (ELEM(but->type, LINK, INLINK)) str = "Add button link";
+ else if (ELEM(but->type, MENU, ICONTEXTROW)) str = but->drawstr;
else if (but->drawstr[0]) str= but->drawstr;
else str= but->tip;
@@ -1121,7 +1121,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
}
/* numeric value */
- if ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI) {
+ if (ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI)) {
if (but->poin==NULL && but->rnapoin.data==NULL);
else if (mode=='c') {
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 3baa672e42d..b7e2ba1c179 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -876,7 +876,7 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect
height= UI_DPI_ICON_SIZE;
/* calculate blend color */
- if ELEM4(but->type, TOG, ROW, TOGN, LISTROW) {
+ if (ELEM4(but->type, TOG, ROW, TOGN, LISTROW)) {
if (but->flag & UI_SELECT);
else if (but->flag & UI_ACTIVE);
else alpha= 0.5f;
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 9072db77b6f..792ea88baa7 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -1776,8 +1776,10 @@ void UI_view2d_scrollers_free(View2DScrollers *scrollers)
void UI_view2d_listview_cell_to_view(View2D *v2d, short columnwidth, short rowheight, float startx, float starty, int column, int row, rctf *rect)
{
/* sanity checks */
- if ELEM(NULL, v2d, rect)
+ if (ELEM(NULL, v2d, rect)) {
return;
+ }
+
if ((columnwidth <= 0) && (rowheight <= 0)) {
rect->xmin = rect->xmax = 0.0f;
rect->ymin = rect->ymax = 0.0f;