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-03-26 13:16:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-26 13:16:13 +0300
commit1bde690e91ab0b27e0da816c7ebcf98ad6459bb6 (patch)
tree46eab45da7b0c8fa5808652c58e8929316ed270a /source/blender/editors/interface
parentfe7812f7c24f4c89cd1d046abc87daad545c2d48 (diff)
Cleanup: style, use braces for editor/interface
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_handlers.c3
-rw-r--r--source/blender/editors/interface/interface_layout.c16
-rw-r--r--source/blender/editors/interface/interface_ops.c3
3 files changed, 16 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 968d41d9795..404de2cd085 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -2555,8 +2555,9 @@ static int ui_text_position_from_hidden(uiBut *but, int pos)
butstr = (but->editstr) ? but->editstr : but->drawstr;
- for (i = 0, strpos = butstr; i < pos; i++)
+ for (i = 0, strpos = butstr; i < pos; i++) {
strpos = BLI_str_find_next_char_utf8(strpos, NULL);
+ }
return (strpos - butstr);
}
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 1bb32cdeeee..e2933f75440 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -3279,8 +3279,9 @@ static void ui_litem_estimate_column_flow(uiLayout *litem)
flow->totcol = max_ii(litem->root->emw / maxw, 1);
flow->totcol = min_ii(flow->totcol, totitem);
}
- else
+ else {
flow->totcol = flow->number;
+ }
/* compute sizes */
x = 0;
@@ -3614,7 +3615,10 @@ static void ui_litem_estimate_grid_flow(uiLayout *litem)
for (gflow->tot_rows = (int)ceilf((float)gflow->tot_items / gflow->tot_columns);
(gflow->tot_columns - step) > 0 &&
(int)ceilf((float)gflow->tot_items / (gflow->tot_columns - step)) <= gflow->tot_rows;
- gflow->tot_columns -= step);
+ gflow->tot_columns -= step)
+ {
+ /* pass */
+ }
}
else {
/* Adjust number of rows to be multiple of given modulo. */
@@ -3625,7 +3629,10 @@ static void ui_litem_estimate_grid_flow(uiLayout *litem)
for (gflow->tot_columns = (int)ceilf((float)gflow->tot_items / gflow->tot_rows);
(gflow->tot_rows - step) > 0 &&
(int)ceilf((float)gflow->tot_items / (gflow->tot_rows - step)) <= gflow->tot_columns;
- gflow->tot_rows -= step);
+ gflow->tot_rows -= step)
+ {
+ /* pass */
+ }
}
}
@@ -4417,8 +4424,9 @@ static void ui_item_flag(uiLayout *litem, int flag)
bitem = (uiButtonItem *)item;
bitem->but->flag |= flag;
}
- else
+ else {
ui_item_flag((uiLayout *)item, flag);
+ }
}
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 97dd79864e1..e00ea2d16bd 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -1313,8 +1313,9 @@ static void edittranslation_find_po_file(const char *root, const char *uilng, ch
tc = strchr(uilng, '_');
if (tc) {
szt = tc - uilng;
- if (szt < sizeof(tstr)) /* Paranoid, should always be true! */
+ if (szt < sizeof(tstr)) { /* Paranoid, should always be true! */
BLI_strncpy(tstr, uilng, szt + 1); /* +1 for '\0' char! */
+ }
}
if (tstr[0]) {
/* Because of some codes like sr_SR@latin... */