Depsgraph: Cleanup, function return value
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 2 Mar 2018 13:12:33 +0000 (14:12 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 2 Mar 2018 13:12:33 +0000 (14:12 +0100)
Driver build result was never used, so no reason to return operation.

source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes.h

index 7572ee9..c0afec0 100644 (file)
@@ -516,7 +516,7 @@ void DepsgraphNodeBuilder::build_animdata(ID *id)
  * \param id: ID-Block that driver is attached to
  * \param fcu: Driver-FCurve
  */
-OperationDepsNode *DepsgraphNodeBuilder::build_driver(ID *id, FCurve *fcu)
+void DepsgraphNodeBuilder::build_driver(ID *id, FCurve *fcu)
 {
        /* Create data node for this driver */
        /* TODO(sergey): Avoid creating same operation multiple times,
@@ -528,18 +528,14 @@ OperationDepsNode *DepsgraphNodeBuilder::build_driver(ID *id, FCurve *fcu)
                                                           DEG_OPCODE_DRIVER,
                                                           fcu->rna_path ? fcu->rna_path : "",
                                                           fcu->array_index);
-
        if (driver_op == NULL) {
-               driver_op = add_operation_node(id,
-                                              DEG_NODE_TYPE_PARAMETERS,
-                                              function_bind(BKE_animsys_eval_driver, _1, id, fcu),
-                                              DEG_OPCODE_DRIVER,
-                                              fcu->rna_path ? fcu->rna_path : "",
-                                              fcu->array_index);
+               add_operation_node(id,
+                                  DEG_NODE_TYPE_PARAMETERS,
+                                  function_bind(BKE_animsys_eval_driver, _1, id, fcu),
+                                  DEG_OPCODE_DRIVER,
+                                  fcu->rna_path ? fcu->rna_path : "",
+                                  fcu->array_index);
        }
-
-       /* return driver node created */
-       return driver_op;
 }
 
 /* Recursively build graph for world */
index 8250151..a18bb4d 100644 (file)
@@ -130,7 +130,7 @@ struct DepsgraphNodeBuilder {
        void build_particles(Object *object);
        void build_cloth(Object *object);
        void build_animdata(ID *id);
-       OperationDepsNode *build_driver(ID *id, FCurve *fcurve);
+       void build_driver(ID *id, FCurve *fcurve);
        void build_ik_pose(Object *object,
                           bPoseChannel *pchan,
                           bConstraint *con);