[Bf-blender-cvs] [90f4b35bc22] master: Cleanup: remove unused argument

Campbell Barton noreply at git.blender.org
Fri Jul 1 03:19:43 CEST 2022


Commit: 90f4b35bc22d5c4fa1b4579514e1596ae9d131b1
Author: Campbell Barton
Date:   Fri Jul 1 11:18:56 2022 +1000
Branches: master
https://developer.blender.org/rB90f4b35bc22d5c4fa1b4579514e1596ae9d131b1

Cleanup: remove unused argument

===================================================================

M	source/blender/draw/engines/eevee_next/eevee_film.cc
M	source/blender/editors/space_outliner/outliner_dragdrop.cc

===================================================================

diff --git a/source/blender/draw/engines/eevee_next/eevee_film.cc b/source/blender/draw/engines/eevee_next/eevee_film.cc
index 44737018c62..84a84e21a2a 100644
--- a/source/blender/draw/engines/eevee_next/eevee_film.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_film.cc
@@ -120,7 +120,7 @@ void Film::sync_mist()
   const ::World *world = inst_.scene->world;
   float mist_start = world ? world->miststa : cam.clip_near;
   float mist_distance = world ? world->mistdist : fabsf(cam.clip_far - cam.clip_near);
-  int mist_type = world ? world->mistype : WO_MIST_LINEAR;
+  int mist_type = world ? world->mistype : (int)WO_MIST_LINEAR;
 
   switch (mist_type) {
     case WO_MIST_QUADRATIC:
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.cc b/source/blender/editors/space_outliner/outliner_dragdrop.cc
index 7782da9d762..c72080be811 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.cc
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.cc
@@ -1124,8 +1124,7 @@ static Collection *collection_parent_from_ID(ID *id)
   return nullptr;
 }
 
-static bool collection_drop_init(
-    bContext *C, wmDrag *drag, const int xy[2], const bool is_link, CollectionDrop *data)
+static bool collection_drop_init(bContext *C, wmDrag *drag, const int xy[2], CollectionDrop *data)
 {
   /* Get collection to drop into. */
   TreeElementInsertType insert_type;
@@ -1194,8 +1193,7 @@ static bool collection_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event
   bool changed = outliner_flag_set(*space_outliner, TSE_HIGHLIGHTED_ANY | TSE_DRAG_ANY, false);
 
   CollectionDrop data;
-  if (((event->modifier & KM_SHIFT) == 0) &&
-      collection_drop_init(C, drag, event->xy, event->modifier & KM_CTRL, &data)) {
+  if (((event->modifier & KM_SHIFT) == 0) && collection_drop_init(C, drag, event->xy, &data)) {
     TreeElement *te = data.te;
     TreeStoreElem *tselem = TREESTORE(te);
     switch (data.insert_type) {
@@ -1233,8 +1231,7 @@ static char *collection_drop_tooltip(bContext *C,
   const wmEvent *event = win ? win->eventstate : nullptr;
 
   CollectionDrop data;
-  if (event && ((event->modifier & KM_SHIFT) == 0) &&
-      collection_drop_init(C, drag, xy, event->modifier & KM_CTRL, &data)) {
+  if (event && ((event->modifier & KM_SHIFT) == 0) && collection_drop_init(C, drag, xy, &data)) {
     const bool is_link = !data.from || (event->modifier & KM_CTRL);
 
     /* Test if we are moving within same parent collection. */
@@ -1307,7 +1304,7 @@ static int collection_drop_invoke(bContext *C, wmOperator *UNUSED(op), const wmE
   wmDrag *drag = reinterpret_cast<wmDrag *>(lb->first);
 
   CollectionDrop data;
-  if (!collection_drop_init(C, drag, event->xy, event->modifier & KM_CTRL, &data)) {
+  if (!collection_drop_init(C, drag, event->xy, &data)) {
     return OPERATOR_CANCELLED;
   }



More information about the Bf-blender-cvs mailing list