Cleanup: redundant assignments
authorCampbell Barton <ideasman42@gmail.com>
Sun, 15 Mar 2020 10:46:18 +0000 (21:46 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 15 Mar 2020 10:46:18 +0000 (21:46 +1100)
source/blender/blenkernel/intern/fluid.c
source/blender/blenkernel/intern/seqcache.c
source/blender/editors/screen/area.c
source/blender/editors/space_script/script_edit.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/nodes/composite/node_composite_tree.c
source/blender/nodes/composite/nodes/node_composite_keying.c

index fc29b4aae327f2d24396aa21212379b4e5d974f8..934dc47cf8171f0ae7b6be653b0b2f56cdd208c2 100644 (file)
@@ -3742,10 +3742,9 @@ static void BKE_fluid_modifier_processDomain(FluidModifierData *mmd,
   baking_mesh = mds->cache_flag & FLUID_DOMAIN_BAKING_MESH;
   baking_particles = mds->cache_flag & FLUID_DOMAIN_BAKING_PARTICLES;
   baking_guide = mds->cache_flag & FLUID_DOMAIN_BAKING_GUIDE;
-  bake_outdated = mds->cache_flag &
-                  (FLUID_DOMAIN_OUTDATED_DATA | FLUID_DOMAIN_OUTDATED_NOISE |
-                   FLUID_DOMAIN_OUTDATED_NOISE | FLUID_DOMAIN_OUTDATED_MESH |
-                   FLUID_DOMAIN_OUTDATED_PARTICLES | FLUID_DOMAIN_OUTDATED_GUIDE);
+  bake_outdated = mds->cache_flag & (FLUID_DOMAIN_OUTDATED_DATA | FLUID_DOMAIN_OUTDATED_NOISE |
+                                     FLUID_DOMAIN_OUTDATED_MESH | FLUID_DOMAIN_OUTDATED_PARTICLES |
+                                     FLUID_DOMAIN_OUTDATED_GUIDE);
 
   bool resume_data, resume_noise, resume_mesh, resume_particles, resume_guide;
   resume_data = (!is_startframe) && (mds->cache_frame_pause_data == scene_framenr);
@@ -4896,7 +4895,6 @@ void BKE_fluid_modifier_create_type_data(struct FluidModifierData *mmd)
 
     mmd->flow->type = FLUID_FLOW_TYPE_SMOKE;
     mmd->flow->behavior = FLUID_FLOW_BEHAVIOR_GEOMETRY;
-    mmd->flow->type = FLUID_FLOW_TYPE_SMOKE;
     mmd->flow->flags = FLUID_FLOW_ABSOLUTE | FLUID_FLOW_USE_PART_SIZE | FLUID_FLOW_USE_INFLOW;
   }
   else if (mmd->type & MOD_FLUID_TYPE_EFFEC) {
index 0846c6c90a622a64ad6ee15f3fd3b78dc9aaf773..aa4066b643f6ed0c776c09bd7722b125f84922df 100644 (file)
@@ -682,7 +682,6 @@ void BKE_sequencer_cache_put(
   key->nfra = cfra - seq->start;
   key->type = type;
   key->cost = cost;
-  key->cache_owner = cache;
   key->link_prev = NULL;
   key->link_next = NULL;
   key->is_temp_cache = true;
index b5cd6219c04c2667132eab984f3d722fbfe94403..a083675ca0107f53e917dab4166afd3971a61f76 100644 (file)
@@ -3175,7 +3175,6 @@ static void metadata_draw_imbuf(ImBuf *ibuf, const rctf *rect, int fontid, const
     ctx.fontid = fontid;
     ctx.xmin = xmin;
     ctx.ymin = ymin;
-    ctx.vertical_offset = vertical_offset;
     ctx.current_y = ofs_y;
     ctx.vertical_offset = vertical_offset;
     IMB_metadata_foreach(ibuf, metadata_custom_draw_fields, &ctx);
index b9e97a19b82682d67a67b79017ddadfbbc66cd0e..d2f2411c538249c2e06f167d7b4aacb0b06203dc 100644 (file)
@@ -67,12 +67,12 @@ void SCRIPT_OT_python_file_run(wmOperatorType *ot)
   ot->name = "Run Python File";
   ot->description = "Run Python file";
   ot->idname = "SCRIPT_OT_python_file_run";
-  ot->flag = OPTYPE_UNDO;
 
   /* api callbacks */
   ot->exec = run_pyfile_exec;
   ot->poll = ED_operator_areaactive;
 
+  /* flags */
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 
   RNA_def_string_file_path(ot->srna, "filepath", NULL, FILE_MAX, "Path", "");
index fccbdb63393113829fcdd0c671e61df8a7032148..4623cc61d29ad413502cbefa0cb7970e6422ba18 100644 (file)
@@ -3048,7 +3048,6 @@ static void UV_OT_select_linked(wmOperatorType *ot)
   ot->name = "Select Linked";
   ot->description = "Select all UV vertices linked to the active UV map";
   ot->idname = "UV_OT_select_linked";
-  ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
   /* api callbacks */
   ot->exec = uv_select_linked_exec;
index 93f2ba44a3a146138695b4005497f504f2a5602a..8c224eb335f8372975147b5bce9ec31fea4973eb 100644 (file)
@@ -101,9 +101,8 @@ static void localize(bNodeTree *localtree, bNodeTree *ntree)
   bNode *node = ntree->nodes.first;
   bNode *local_node = localtree->nodes.first;
   while (node != NULL) {
-    local_node->original = node;
 
-    /* ensure new user input gets handled ok */
+    /* Ensure new user input gets handled ok. */
     node->need_exec = 0;
     local_node->original = node;
 
index 504126cb3879a9cd40cbef2cb48f8c569c5e9a0e..73e86a21ebef7efc51fc10923d18d85418c7f1f1 100644 (file)
@@ -57,7 +57,6 @@ static void node_composit_init_keying(bNodeTree *UNUSED(ntree), bNode *node)
   data->despill_factor = 1.0f;
   data->edge_kernel_radius = 3;
   data->edge_kernel_tolerance = 0.1f;
-  data->clip_white = 1.0f;
   data->clip_black = 0.0f;
   data->clip_white = 1.0f;