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:
authorAnkit Meel <ankitjmeel@gmail.com>2020-11-07 18:51:02 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2020-11-07 19:22:53 +0300
commit7be47dadea5066ae095c644e0b4f1f10d75f5ab3 (patch)
tree2cc2b47b028d6d574f972e019232fb2a48894e5e /source/creator
parent4429b4b77ef6754739a3c2b4fabd0537999e9bdc (diff)
Cleanup: Clang-tidy, readability-else-after-return
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator_args.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index 58601dcb6af..c6a1c565350 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -124,10 +124,8 @@ static bool parse_int_relative(const char *str,
*r_err_msg = msg;
return false;
}
- else {
- *r_value = (int)value;
- return true;
- }
+ *r_value = (int)value;
+ return true;
}
static const char *parse_int_range_sep_search(const char *str, const char *str_end_test)
@@ -230,10 +228,8 @@ static bool parse_int_strict_range(const char *str,
*r_err_msg = msg;
return false;
}
- else {
- *r_value = (int)value;
- return true;
- }
+ *r_value = (int)value;
+ return true;
}
static bool parse_int(const char *str,
@@ -1589,10 +1585,8 @@ static int arg_handle_render_frame(int argc, const char **argv, void *data)
printf("\nError: frame number must follow '%s'.\n", arg_id);
return 0;
}
- else {
- printf("\nError: no blend loaded. cannot use '%s'.\n", arg_id);
- return 0;
- }
+ printf("\nError: no blend loaded. cannot use '%s'.\n", arg_id);
+ return 0;
}
static const char arg_handle_render_animation_doc[] =
@@ -1674,10 +1668,8 @@ static int arg_handle_frame_start_set(int argc, const char **argv, void *data)
printf("\nError: frame number must follow '%s'.\n", arg_id);
return 0;
}
- else {
- printf("\nError: no blend loaded. cannot use '%s'.\n", arg_id);
- return 0;
- }
+ printf("\nError: no blend loaded. cannot use '%s'.\n", arg_id);
+ return 0;
}
static const char arg_handle_frame_end_set_doc[] =
@@ -1709,10 +1701,8 @@ static int arg_handle_frame_end_set(int argc, const char **argv, void *data)
printf("\nError: frame number must follow '%s'.\n", arg_id);
return 0;
}
- else {
- printf("\nError: no blend loaded. cannot use '%s'.\n", arg_id);
- return 0;
- }
+ printf("\nError: no blend loaded. cannot use '%s'.\n", arg_id);
+ return 0;
}
static const char arg_handle_frame_skip_set_doc[] =
@@ -1737,10 +1727,8 @@ static int arg_handle_frame_skip_set(int argc, const char **argv, void *data)
printf("\nError: number of frames to step must follow '%s'.\n", arg_id);
return 0;
}
- else {
- printf("\nError: no blend loaded. cannot use '%s'.\n", arg_id);
- return 0;
- }
+ printf("\nError: no blend loaded. cannot use '%s'.\n", arg_id);
+ return 0;
}
static const char arg_handle_python_file_run_doc[] =