diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-05-24 11:07:54 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-05-24 11:07:54 +0300 |
commit | 123f4db9bd08151d5a8609a9b98257caaf7ae3ac (patch) | |
tree | 3b703b8a845fa6e82a12c7549ce9e2653e361755 /source/blender/depsgraph/intern | |
parent | cd968a32739587a5baacdd278a670d44570cbd8a (diff) |
Cleanup: Else after return in depsgraph code
Diffstat (limited to 'source/blender/depsgraph/intern')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h b/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h index 5cbd8c8dd75..853a83ce41b 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h @@ -36,34 +36,34 @@ Relation *DepsgraphRelationBuilder::add_relation(const KeyFrom &key_from, if (op_from && op_to) { return add_operation_relation(op_from, op_to, description, flags); } + + if (!op_from) { + /* XXX TODO: handle as error or report if needed. */ + fprintf(stderr, + "add_relation(%s) - Could not find op_from (%s)\n", + description, + key_from.identifier().c_str()); + } else { - if (!op_from) { - /* XXX TODO: handle as error or report if needed. */ - fprintf(stderr, - "add_relation(%s) - Could not find op_from (%s)\n", - description, - key_from.identifier().c_str()); - } - else { - fprintf(stderr, - "add_relation(%s) - Failed, but op_from (%s) was ok\n", - description, - key_from.identifier().c_str()); - } - if (!op_to) { - /* XXX TODO: handle as error or report if needed. */ - fprintf(stderr, - "add_relation(%s) - Could not find op_to (%s)\n", - description, - key_to.identifier().c_str()); - } - else { - fprintf(stderr, - "add_relation(%s) - Failed, but op_to (%s) was ok\n", - description, - key_to.identifier().c_str()); - } + fprintf(stderr, + "add_relation(%s) - Failed, but op_from (%s) was ok\n", + description, + key_from.identifier().c_str()); + } + if (!op_to) { + /* XXX TODO: handle as error or report if needed. */ + fprintf(stderr, + "add_relation(%s) - Could not find op_to (%s)\n", + description, + key_to.identifier().c_str()); } + else { + fprintf(stderr, + "add_relation(%s) - Failed, but op_to (%s) was ok\n", + description, + key_to.identifier().c_str()); + } + return nullptr; } |