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:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-26 13:16:47 +0300
commitce3b78c73a7ccc16fdccf7decedb5d1578dfdf0a (patch)
tree87f1a9c41ebe6f74806f1ae76206f1d328c85700 /source/blender/editors/space_buttons/buttons_ops.c
parent5279d118c2ddee0e6fef66aaf78452c1b302dd42 (diff)
Cleanup: style, use braces for editor/spaces
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_ops.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 7cec9c09767..3ae88f9cc78 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -99,8 +99,9 @@ static int file_browse_exec(bContext *C, wmOperator *op)
char *str, path[FILE_MAX];
const char *path_prop = RNA_struct_find_property(op->ptr, "directory") ? "directory" : "filepath";
- if (RNA_struct_property_is_set(op->ptr, path_prop) == 0 || fbo == NULL)
+ if (RNA_struct_property_is_set(op->ptr, path_prop) == 0 || fbo == NULL) {
return OPERATOR_CANCELLED;
+ }
str = RNA_string_get_alloc(op->ptr, path_prop, NULL, 0);
@@ -127,7 +128,9 @@ static int file_browse_exec(bContext *C, wmOperator *op)
}
else {
char * const lslash = (char *)BLI_last_slash(str);
- if (lslash) lslash[1] = '\0';
+ if (lslash) {
+ lslash[1] = '\0';
+ }
}
}
@@ -176,8 +179,9 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event)
UI_context_active_but_prop_get_filebrowser(C, &ptr, &prop, &is_undo);
- if (!prop)
+ if (!prop) {
return OPERATOR_CANCELLED;
+ }
str = RNA_property_string_get_alloc(&ptr, prop, NULL, 0, NULL);
@@ -189,8 +193,9 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event)
if (event->alt) {
char *lslash = (char *)BLI_last_slash(str);
- if (lslash)
+ if (lslash) {
*lslash = '\0';
+ }
}