diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-31 14:20:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-31 14:23:33 +0300 |
commit | 17a409e223a7b72fbfa89c97728017e5afcb54a5 (patch) | |
tree | 6e8adc5109f0fbf859f64fad0971e67f072638bc /source/blender | |
parent | b74e38861714be4aa36e2e10fbce8b3b21bb8adc (diff) |
Cleanup: use '_recursive' suffix instead of '_rec'
This convention isn't very clear and wasn't used much.
Use the more verbose term instead.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 12 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_utils.c | 12 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_transform.c | 17 | ||||
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 16 |
5 files changed, 30 insertions, 29 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 9fb28fe250a..3501ac642c5 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -752,10 +752,10 @@ static int metaseq_end(Sequence *metaseq) return metaseq->start + metaseq->len - metaseq->endofs; } -static void seq_update_sound_bounds_recursive_rec(Scene *scene, - Sequence *metaseq, - int start, - int end) +static void seq_update_sound_bounds_recursive_impl(Scene *scene, + Sequence *metaseq, + int start, + int end) { Sequence *seq; @@ -763,7 +763,7 @@ static void seq_update_sound_bounds_recursive_rec(Scene *scene, * since sound is played outside of evaluating the imbufs, */ for (seq = metaseq->seqbase.first; seq; seq = seq->next) { if (seq->type == SEQ_TYPE_META) { - seq_update_sound_bounds_recursive_rec( + seq_update_sound_bounds_recursive_impl( scene, seq, max_ii(start, metaseq_start(seq)), min_ii(end, metaseq_end(seq))); } else if (ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SCENE)) { @@ -790,7 +790,7 @@ static void seq_update_sound_bounds_recursive_rec(Scene *scene, static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) { - seq_update_sound_bounds_recursive_rec( + seq_update_sound_bounds_recursive_impl( scene, metaseq, metaseq_start(metaseq), metaseq_end(metaseq)); } diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 58ceef5b7db..8f63f239abc 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -482,10 +482,10 @@ void ED_armature_edit_transform_mirror_update(Object *obedit) /* Armature EditMode Conversions */ /* converts Bones to EditBone list, used for tools as well */ -static EditBone *make_boneList_rec(ListBase *edbo, - ListBase *bones, - EditBone *parent, - Bone *actBone) +static EditBone *make_boneList_recursive(ListBase *edbo, + ListBase *bones, + EditBone *parent, + Bone *actBone) { EditBone *eBone; EditBone *eBoneAct = NULL; @@ -564,7 +564,7 @@ static EditBone *make_boneList_rec(ListBase *edbo, /* Add children if necessary. */ if (curBone->childbase.first) { - eBoneTest = make_boneList_rec(edbo, &curBone->childbase, eBone, actBone); + eBoneTest = make_boneList_recursive(edbo, &curBone->childbase, eBone, actBone); if (eBoneTest) { eBoneAct = eBoneTest; } @@ -595,7 +595,7 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, struct Bone *actBone) { BLI_assert(!edbo->first && !edbo->last); - EditBone *active = make_boneList_rec(edbo, bones, NULL, actBone); + EditBone *active = make_boneList_recursive(edbo, bones, NULL, actBone); for (EditBone *ebone = edbo->first; ebone; ebone = ebone->next) { Bone *bone = ebone->temp.bone; diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index fe79894a351..3be5e033e00 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -207,12 +207,12 @@ typedef struct ApplyArmature_ParentState { } ApplyArmature_ParentState; /* Recursive walk for Apply To Selected mode; pstate NULL unless child of an applied bone. */ -static void applyarmature_process_selected_rec(bArmature *arm, - bPose *pose, - bPose *pose_eval, - Bone *bone, - ListBase *selected, - ApplyArmature_ParentState *pstate) +static void applyarmature_process_selected_recursive(bArmature *arm, + bPose *pose, + bPose *pose_eval, + Bone *bone, + ListBase *selected, + ApplyArmature_ParentState *pstate) { bPoseChannel *pchan = BKE_pose_channel_find_name(pose, bone->name); const bPoseChannel *pchan_eval = BKE_pose_channel_find_name(pose_eval, bone->name); @@ -334,7 +334,7 @@ static void applyarmature_process_selected_rec(bArmature *arm, } for (Bone *child = bone->childbase.first; child; child = child->next) { - applyarmature_process_selected_rec(arm, pose, pose_eval, child, selected, pstate); + applyarmature_process_selected_recursive(arm, pose, pose_eval, child, selected, pstate); } } @@ -390,7 +390,8 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op) if (use_selected) { /* The selected only mode requires a recursive walk to handle parent-child relations. */ for (Bone *bone = arm->bonebase.first; bone; bone = bone->next) { - applyarmature_process_selected_rec(arm, pose, ob_eval->pose, bone, &selected_bones, NULL); + applyarmature_process_selected_recursive( + arm, pose, ob_eval->pose, bone, &selected_bones, NULL); } BLI_freelistN(&selected_bones); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index dec38501d38..1396c0a2f69 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -2627,7 +2627,7 @@ static int filelist_readjob_list_lib(const char *root, ListBase *entries, const /* Kept for reference here, in case we want to add back that feature later. * We do not need it currently. */ /* Code ***NOT*** updated for job stuff! */ -static void filelist_readjob_main_rec(Main *bmain, FileList *filelist) +static void filelist_readjob_main_recursive(Main *bmain, FileList *filelist) { ID *id; FileDirEntry *files, *firstlib = NULL; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 71e63547eae..29d8f213d7e 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1429,7 +1429,7 @@ static void transseq_restore(TransSeq *ts, Sequence *seq) seq->len = ts->len; } -static int slip_add_sequences_rec( +static int slip_add_sequences_recursive( ListBase *seqbasep, Sequence **seq_array, bool *trim, int offset, bool do_trim) { Sequence *seq; @@ -1443,7 +1443,7 @@ static int slip_add_sequences_rec( if (seq->type == SEQ_TYPE_META) { /* trim the sub-sequences */ - num_items += slip_add_sequences_rec( + num_items += slip_add_sequences_recursive( &seq->seqbase, seq_array, trim, num_items + offset, false); } else if (seq->type & SEQ_TYPE_EFFECT) { @@ -1455,7 +1455,7 @@ static int slip_add_sequences_rec( return num_items; } -static int slip_count_sequences_rec(ListBase *seqbasep, bool first_level) +static int slip_count_sequences_recursive(ListBase *seqbasep, bool first_level) { Sequence *seq; int trimmed_sequences = 0; @@ -1466,7 +1466,7 @@ static int slip_count_sequences_rec(ListBase *seqbasep, bool first_level) if (seq->type == SEQ_TYPE_META) { /* trim the sub-sequences */ - trimmed_sequences += slip_count_sequences_rec(&seq->seqbase, false); + trimmed_sequences += slip_count_sequences_recursive(&seq->seqbase, false); } } } @@ -1484,7 +1484,7 @@ static int sequencer_slip_invoke(bContext *C, wmOperator *op, const wmEvent *eve View2D *v2d = UI_view2d_fromcontext(C); /* first recursively count the trimmed elements */ - num_seq = slip_count_sequences_rec(ed->seqbasep, true); + num_seq = slip_count_sequences_recursive(ed->seqbasep, true); if (num_seq == 0) { return OPERATOR_CANCELLED; @@ -1502,7 +1502,7 @@ static int sequencer_slip_invoke(bContext *C, wmOperator *op, const wmEvent *eve data->num_input.unit_sys = USER_UNIT_NONE; data->num_input.unit_type[0] = 0; - slip_add_sequences_rec(ed->seqbasep, data->seq_array, data->trim, 0, true); + slip_add_sequences_recursive(ed->seqbasep, data->seq_array, data->trim, 0, true); for (i = 0; i < num_seq; i++) { transseq_backup(data->ts + i, data->seq_array[i]); @@ -1596,7 +1596,7 @@ static int sequencer_slip_exec(bContext *C, wmOperator *op) bool success = false; /* first recursively count the trimmed elements */ - num_seq = slip_count_sequences_rec(ed->seqbasep, true); + num_seq = slip_count_sequences_recursive(ed->seqbasep, true); if (num_seq == 0) { return OPERATOR_CANCELLED; @@ -1608,7 +1608,7 @@ static int sequencer_slip_exec(bContext *C, wmOperator *op) data->trim = MEM_mallocN(num_seq * sizeof(bool), "trimdata_trim"); data->num_seq = num_seq; - slip_add_sequences_rec(ed->seqbasep, data->seq_array, data->trim, 0, true); + slip_add_sequences_recursive(ed->seqbasep, data->seq_array, data->trim, 0, true); for (i = 0; i < num_seq; i++) { transseq_backup(data->ts + i, data->seq_array[i]); |