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:
authorSybren A. Stüvel <sybren@blender.org>2020-07-03 18:25:04 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-07-03 18:42:45 +0300
commit651d1aa7c836892e95117e17716605a774c0220b (patch)
tree824c048f96f320fe1066e5d27ee7af5e19d57851 /source/blender/editors/transform/transform_ops.c
parent35ce16939cc972b2cb85192ca23994fc61b9fbdd (diff)
Cleanup: Editors/Transform, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/transform` module. No functional changes.
Diffstat (limited to 'source/blender/editors/transform/transform_ops.c')
-rw-r--r--source/blender/editors/transform/transform_ops.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index f86bcc41bee..ab9548ad52e 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -516,22 +516,19 @@ static int transform_invoke(bContext *C, wmOperator *op, const wmEvent *event)
if ((event == NULL) && RNA_struct_property_is_set(op->ptr, "value")) {
return transform_exec(C, op);
}
- else {
- /* add temp handler */
- WM_event_add_modal_handler(C, op);
- op->flag |= OP_IS_MODAL_GRAB_CURSOR; // XXX maybe we want this with the gizmo only?
+ /* add temp handler */
+ WM_event_add_modal_handler(C, op);
- /* Use when modal input has some transformation to begin with. */
- {
- TransInfo *t = op->customdata;
- if (UNLIKELY(!is_zero_v4(t->values_modal_offset))) {
- transformApply(C, t);
- }
- }
+ op->flag |= OP_IS_MODAL_GRAB_CURSOR; // XXX maybe we want this with the gizmo only?
- return OPERATOR_RUNNING_MODAL;
+ /* Use when modal input has some transformation to begin with. */
+ TransInfo *t = op->customdata;
+ if (UNLIKELY(!is_zero_v4(t->values_modal_offset))) {
+ transformApply(C, t);
}
+
+ return OPERATOR_RUNNING_MODAL;
}
static bool transform_poll_property(const bContext *UNUSED(C),