diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-22 02:39:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-22 12:48:17 +0300 |
commit | 735515a3f9e4c41738bf714d682b13db64adb638 (patch) | |
tree | 04b551336131bc84ecc664a77ae0cefdded78d0b /source/blender/blenkernel/intern/suggestions.c | |
parent | 14a49950ff11f43b7a5a73da545339b969de97f0 (diff) |
Cleanup: style, use braces for blenkernel
Diffstat (limited to 'source/blender/blenkernel/intern/suggestions.c')
-rw-r--r-- | source/blender/blenkernel/intern/suggestions.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/suggestions.c b/source/blender/blenkernel/intern/suggestions.c index 7631afaa680..42e1ef6fa0a 100644 --- a/source/blender/blenkernel/intern/suggestions.c +++ b/source/blender/blenkernel/intern/suggestions.c @@ -74,8 +74,9 @@ void free_texttools(void) void texttool_text_set_active(Text *text) { - if (activeToolText == text) + if (activeToolText == text) { return; + } texttool_text_clear(); activeToolText = text; } @@ -123,14 +124,16 @@ void texttool_suggest_add(const char *name, char type) /* Newitem comes after this item, insert here */ if (cmp >= 0) { newitem->prev = item; - if (item->next) + if (item->next) { item->next->prev = newitem; + } newitem->next = item->next; item->next = newitem; /* At last item, set last pointer here */ - if (item == suggestions.last) + if (item == suggestions.last) { suggestions.last = newitem; + } break; } } @@ -150,8 +153,9 @@ void texttool_suggest_prefix(const char *prefix, const int prefix_len) SuggItem *match, *first, *last; int cmp, top = 0; - if (!suggestions.first) + if (!suggestions.first) { return; + } if (prefix_len == 0) { suggestions.selected = suggestions.firstmatch = suggestions.first; suggestions.lastmatch = suggestions.last; @@ -176,8 +180,9 @@ void texttool_suggest_prefix(const char *prefix, const int prefix_len) top++; } if (first) { - if (!last) + if (!last) { last = suggestions.last; + } suggestions.firstmatch = first; suggestions.lastmatch = last; suggestions.selected = first; @@ -228,8 +233,9 @@ void texttool_docs_show(const char *docs) { int len; - if (!docs) + if (!docs) { return; + } len = strlen(docs); |