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/freestyle.c | |
parent | 14a49950ff11f43b7a5a73da545339b969de97f0 (diff) |
Cleanup: style, use braces for blenkernel
Diffstat (limited to 'source/blender/blenkernel/intern/freestyle.c')
-rw-r--r-- | source/blender/blenkernel/intern/freestyle.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/freestyle.c b/source/blender/blenkernel/intern/freestyle.c index 72b81651124..19c5012dc54 100644 --- a/source/blender/blenkernel/intern/freestyle.c +++ b/source/blender/blenkernel/intern/freestyle.c @@ -145,8 +145,9 @@ static void copy_module(FreestyleModuleConfig *new_module, FreestyleModuleConfig bool BKE_freestyle_module_delete(FreestyleConfig *config, FreestyleModuleConfig *module_conf) { - if (BLI_findindex(&config->modules, module_conf) == -1) + if (BLI_findindex(&config->modules, module_conf) == -1) { return false; + } BLI_freelinkN(&config->modules, module_conf); return true; } @@ -214,8 +215,9 @@ FreestyleLineSet *BKE_freestyle_lineset_add(struct Main *bmain, bool BKE_freestyle_lineset_delete(FreestyleConfig *config, FreestyleLineSet *lineset) { - if (BLI_findindex(&config->linesets, lineset) == -1) + if (BLI_findindex(&config->linesets, lineset) == -1) { return false; + } if (lineset->group) { id_us_min(&lineset->group->id); } @@ -233,8 +235,9 @@ FreestyleLineSet *BKE_freestyle_lineset_get_active(FreestyleConfig *config) FreestyleLineSet *lineset; for (lineset = (FreestyleLineSet *)config->linesets.first; lineset; lineset = lineset->next) { - if (lineset->flags & FREESTYLE_LINESET_CURRENT) + if (lineset->flags & FREESTYLE_LINESET_CURRENT) { return lineset; + } } return NULL; } @@ -246,8 +249,9 @@ short BKE_freestyle_lineset_get_active_index(FreestyleConfig *config) for (lineset = (FreestyleLineSet *)config->linesets.first, i = 0; lineset; lineset = lineset->next, i++) { - if (lineset->flags & FREESTYLE_LINESET_CURRENT) + if (lineset->flags & FREESTYLE_LINESET_CURRENT) { return i; + } } return 0; } @@ -259,9 +263,11 @@ void BKE_freestyle_lineset_set_active_index(FreestyleConfig *config, short index for (lineset = (FreestyleLineSet *)config->linesets.first, i = 0; lineset; lineset = lineset->next, i++) { - if (i == index) + if (i == index) { lineset->flags |= FREESTYLE_LINESET_CURRENT; - else + } + else { lineset->flags &= ~FREESTYLE_LINESET_CURRENT; + } } } |