Commit: d59079c5e1b40cfd650cf470ef223928bd304e8f
Author: Julian Eisel
Date:   Sun Oct 16 15:19:18 2016 +0200
Branches: master
https://developer.blender.org/rBd59079c5e1b40cfd650cf470ef223928bd304e8f

Cleanup: Unused parameters in Outliner

These were only passed to own recursion calls.

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

M       source/blender/editors/space_outliner/outliner_draw.c
M       source/blender/editors/space_outliner/outliner_edit.c
M       source/blender/editors/space_outliner/outliner_intern.h
M       source/blender/editors/space_outliner/outliner_select.c
M       source/blender/editors/space_outliner/outliner_tools.c
M       source/blender/editors/space_outliner/outliner_tree.c

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

diff --git a/source/blender/editors/space_outliner/outliner_draw.c 
b/source/blender/editors/space_outliner/outliner_draw.c
index bc2e9c8..33a5a7c 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -155,7 +155,7 @@ static void restrictbutton_recursive_ebone(bContext *C, 
EditBone *ebone_parent,
        }
 }
 
-static void restrictbutton_recursive_bone(bContext *C, bArmature *arm, Bone 
*bone_parent, int flag, bool set_flag)
+static void restrictbutton_recursive_bone(Bone *bone_parent, int flag, bool 
set_flag)
 {
        Bone *bone;
        for (bone = bone_parent->childbase.first; bone; bone = bone->next) {
@@ -166,7 +166,7 @@ static void restrictbutton_recursive_bone(bContext *C, 
bArmature *arm, Bone *bon
                else {
                        bone->flag &= ~flag;
                }
-               restrictbutton_recursive_bone(C, arm, bone, flag, set_flag);
+               restrictbutton_recursive_bone(bone, flag, set_flag);
        }
 
 }
@@ -294,29 +294,27 @@ static void restrictbutton_modifier_cb(bContext *C, void 
*UNUSED(poin), void *po
        WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
 }
 
-static void restrictbutton_bone_visibility_cb(bContext *C, void *poin, void 
*poin2)
+static void restrictbutton_bone_visibility_cb(bContext *C, void *UNUSED(poin), 
void *poin2)
 {
-       bArmature *arm = (bArmature *)poin;
        Bone *bone = (Bone *)poin2;
        if (bone->flag & BONE_HIDDEN_P)
                bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
 
        if (CTX_wm_window(C)->eventstate->ctrl) {
-               restrictbutton_recursive_bone(C, arm, bone, BONE_HIDDEN_P, 
(bone->flag & BONE_HIDDEN_P) != 0);
+               restrictbutton_recursive_bone(bone, BONE_HIDDEN_P, (bone->flag 
& BONE_HIDDEN_P) != 0);
        }
 
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
 }
 
-static void restrictbutton_bone_select_cb(bContext *C, void *poin, void *poin2)
+static void restrictbutton_bone_select_cb(bContext *C, void *UNUSED(poin), 
void *poin2)
 {
-       bArmature *arm = (bArmature *)poin;
        Bone *bone = (Bone *)poin2;
        if (bone->flag & BONE_UNSELECTABLE)
                bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
 
        if (CTX_wm_window(C)->eventstate->ctrl) {
-               restrictbutton_recursive_bone(C, arm, bone, BONE_UNSELECTABLE, 
(bone->flag & BONE_UNSELECTABLE) != 0);
+               restrictbutton_recursive_bone(bone, BONE_UNSELECTABLE, 
(bone->flag & BONE_UNSELECTABLE) != 0);
        }
 
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
@@ -893,7 +891,7 @@ static void outliner_draw_rnacols(ARegion *ar, int sizex)
                  miny);
 }
 
-static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, 
SpaceOops *soops, int sizex, ListBase *lb)
+static void outliner_draw_rnabuts(uiBlock *block, ARegion *ar, SpaceOops 
*soops, int sizex, ListBase *lb)
 {
        TreeElement *te;
        TreeStoreElem *tselem;
@@ -932,7 +930,7 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene 
*scene, ARegion *ar, Spa
                        }
                }
                
-               if (TSELEM_OPEN(tselem, soops)) outliner_draw_rnabuts(block, 
scene, ar, soops, sizex, &te->subtree);
+               if (TSELEM_OPEN(tselem, soops)) outliner_draw_rnabuts(block, 
ar, soops, sizex, &te->subtree);
        }
 
        UI_block_emboss_set(block, UI_EMBOSS);
@@ -1414,7 +1412,7 @@ static void outliner_draw_iconrow(bContext *C, uiBlock 
*block, Scene *scene, Spa
 }
 
 /* closed tree element */
-static void outliner_set_coord_tree_element(SpaceOops *soops, TreeElement *te, 
int startx, int starty)
+static void outliner_set_coord_tree_element(TreeElement *te, int startx, int 
starty)
 {
        TreeElement *ten;
        
@@ -1423,7 +1421,7 @@ static void outliner_set_coord_tree_element(SpaceOops 
*soops, TreeElement *te, i
        te->ys = starty;
        
        for (ten = te->subtree.first; ten; ten = ten->next) {
-               outliner_set_coord_tree_element(soops, ten, startx + UI_UNIT_X, 
starty);
+               outliner_set_coord_tree_element(ten, startx + UI_UNIT_X, 
starty);
        }
 }
 
@@ -1649,7 +1647,7 @@ static void outliner_draw_tree_element(
        }
        else {
                for (ten = te->subtree.first; ten; ten = ten->next) {
-                       outliner_set_coord_tree_element(soops, ten, startx, 
*starty);
+                       outliner_set_coord_tree_element(ten, startx, *starty);
                }
                
                *starty -= UI_UNIT_Y;
@@ -1690,7 +1688,7 @@ static void outliner_draw_hierarchy(SpaceOops *soops, 
ListBase *lb, int startx,
        }
 }
 
-static void outliner_draw_struct_marks(ARegion *ar, SpaceOops *soops, ListBase 
*lb, int *starty) 
+static void outliner_draw_struct_marks(ARegion *ar, SpaceOops *soops, ListBase 
*lb, int *starty)
 {
        TreeElement *te;
        TreeStoreElem *tselem;
@@ -1712,7 +1710,7 @@ static void outliner_draw_struct_marks(ARegion *ar, 
SpaceOops *soops, ListBase *
        }
 }
 
-static void outliner_draw_selection(ARegion *ar, SpaceOops *soops, ListBase 
*lb, int *starty) 
+static void outliner_draw_selection(ARegion *ar, SpaceOops *soops, ListBase 
*lb, int *starty)
 {
        TreeElement *te;
        TreeStoreElem *tselem;
@@ -1889,7 +1887,7 @@ void draw_outliner(const bContext *C)
        if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
                /* draw rna buttons */
                outliner_draw_rnacols(ar, sizex_rna);
-               outliner_draw_rnabuts(block, scene, ar, soops, sizex_rna, 
&soops->tree);
+               outliner_draw_rnabuts(block, ar, soops, sizex_rna, 
&soops->tree);
        }
        else if ((soops->outlinevis == SO_ID_ORPHANS) && !(soops->flag & 
SO_HIDE_RESTRICTCOLS)) {
                /* draw user toggle columns */
diff --git a/source/blender/editors/space_outliner/outliner_edit.c 
b/source/blender/editors/space_outliner/outliner_edit.c
index 8eb53d0..345ac35 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -117,9 +117,7 @@ static void outliner_open_reveal(SpaceOops *soops, ListBase 
*lb, TreeElement *te
 }
 #endif
 
-static TreeElement *outliner_dropzone_element(
-        const SpaceOops *soops, TreeElement *te,
-        const float fmval[2], const bool children)
+static TreeElement *outliner_dropzone_element(TreeElement *te, const float 
fmval[2], const bool children)
 {
        if ((fmval[1] > te->ys) && (fmval[1] < (te->ys + UI_UNIT_Y))) {
                /* name and first icon */
@@ -129,7 +127,7 @@ static TreeElement *outliner_dropzone_element(
        /* Not it.  Let's look at its children. */
        if (children && (TREESTORE(te)->flag & TSE_CLOSED) == 0 && 
(te->subtree.first)) {
                for (te = te->subtree.first; te; te = te->next) {
-                       TreeElement *te_valid = 
outliner_dropzone_element(soops, te, fmval, children);
+                       TreeElement *te_valid = outliner_dropzone_element(te, 
fmval, children);
                        if (te_valid)
                                return te_valid;
                }
@@ -143,7 +141,7 @@ TreeElement *outliner_dropzone_find(const SpaceOops *soops, 
const float fmval[2]
        TreeElement *te;
 
        for (te = soops->tree.first; te; te = te->next) {
-               TreeElement *te_valid = outliner_dropzone_element(soops, te, 
fmval, children);
+               TreeElement *te_valid = outliner_dropzone_element(te, fmval, 
children);
                if (te_valid)
                        return te_valid;
        }
@@ -164,7 +162,7 @@ static int do_outliner_item_openclose(bContext *C, 
SpaceOops *soops, TreeElement
                /* all below close/open? */
                if (all) {
                        tselem->flag &= ~TSE_CLOSED;
-                       outliner_set_flag(soops, &te->subtree, TSE_CLOSED, 
!outliner_has_one_flag(soops, &te->subtree, TSE_CLOSED, 1));
+                       outliner_set_flag(&te->subtree, TSE_CLOSED, 
!outliner_has_one_flag(&te->subtree, TSE_CLOSED, 1));
                }
                else {
                        if (tselem->flag & TSE_CLOSED) tselem->flag &= 
~TSE_CLOSED;
@@ -252,7 +250,7 @@ void item_rename_cb(
        do_item_rename(ar, te, tselem, reports);
 }
 
-static int do_outliner_item_rename(ReportList *reports, ARegion *ar, SpaceOops 
*soops, TreeElement *te, const float mval[2])
+static int do_outliner_item_rename(ReportList *reports, ARegion *ar, 
TreeElement *te, const float mval[2])
 {
        if (mval[1] > te->ys && mval[1] < te->ys + UI_UNIT_Y) {
                TreeStoreElem *tselem = TREESTORE(te);
@@ -266,7 +264,7 @@ static int do_outliner_item_rename(ReportList *reports, 
ARegion *ar, SpaceOops *
        }
        
        for (te = te->subtree.first; te; te = te->next) {
-               if (do_outliner_item_rename(reports, ar, soops, te, mval)) 
return 1;
+               if (do_outliner_item_rename(reports, ar, te, mval)) return 1;
        }
        return 0;
 }
@@ -282,7 +280,7 @@ static int outliner_item_rename(bContext *C, wmOperator 
*op, const wmEvent *even
        UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], 
&fmval[0], &fmval[1]);
        
        for (te = soops->tree.first; te; te = te->next) {
-               if (do_outliner_item_rename(op->reports, ar, soops, te, fmval)) 
{
+               if (do_outliner_item_rename(op->reports, ar, te, fmval)) {
                        changed = true;
                        break;
                }
@@ -713,20 +711,20 @@ void lib_reload_cb(
 
 /* Apply Settings ------------------------------- */
 
-static int outliner_count_levels(SpaceOops *soops, ListBase *lb, const int 
curlevel)
+static int outliner_count_levels(ListBase *lb, const int curlevel)
 {
        TreeElement *te;
        int level = curlevel, lev;
        
        for (te = lb->first; te; te = te->next) {
                
-               lev = outliner_count_levels(soops, &te->subtree, curlevel + 1);
+               lev = outliner_count_levels(&te->subtree, curlevel + 1);
                if (lev > level) level = lev;
        }
        return level;
 }
 
-int outliner_has_one_flag(SpaceOops *soops, ListBase *lb, short flag, const 
int curlevel)
+int outliner_has_one_flag(ListBase *lb, short flag, const int curlevel)
 {
        TreeElement *te;
        TreeStoreElem *tselem;
@@ -736,13 +734,13 @@ int outliner_has_one_flag(SpaceOops *soops, ListBase *lb, 
short flag, const int
                tselem = TREESTORE(te);
                if (tselem->flag & flag) return curlevel;
                
-               level = outliner_has_one_flag(soops, &te->subtree, flag, 
curlevel + 1);
+               level = outliner_has_one_flag(&te->subtree, flag, curlevel + 1);
                if (level) return level;
        }
        return 0;
 }
 
-void outliner_set_flag(SpaceOops *soops, ListBase *lb, short flag, short set)
+void outliner_set_flag(ListBase *lb, short flag, short set)
 {
        TreeElement *te;
        TreeStoreElem *tselem;
@@ -751,7 +749,7 @@ void outliner_set_flag(SpaceOops *soops, ListBase *lb, 
short flag, short set)
                tselem = TREESTORE(te);
                if (set == 0) tselem->flag &= ~flag;
                else tselem->flag |= flag;
-               outliner_set_flag(soops, &te->subtree, flag, set);
+               outliner_set_flag(&te->subtree, flag, set);
        }
 }
 
@@ -964,10 +962,10 @@ static int outliner_toggle_expanded_exec(bContext *C, 
wmOperator *UNUSED(op))
        SpaceOops *soops = CTX_wm_spa

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to