From 123f4db9bd08151d5a8609a9b98257caaf7ae3ac Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 24 May 2022 10:07:54 +0200 Subject: Cleanup: Else after return in depsgraph code --- .../intern/builder/deg_builder_relations_impl.h | 52 +++++++++++----------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'source/blender/depsgraph') 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; } -- cgit v1.2.3