diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 14:34:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 14:34:03 +0300 |
commit | 606805d1b78e32fe007452fd75b5d8522eb43a04 (patch) | |
tree | 2394adb4c0743d014d7e3e78369f91b074a8ed29 /source/blender/sequencer/intern | |
parent | f8cbd333d653022d3a3340d0249dd957f02e31e5 (diff) |
Cleanup: use 'r_' prefix for return arguments, order last
Diffstat (limited to 'source/blender/sequencer/intern')
-rw-r--r-- | source/blender/sequencer/intern/iterator.c | 20 | ||||
-rw-r--r-- | source/blender/sequencer/intern/strip_select.c | 16 |
2 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/sequencer/intern/iterator.c b/source/blender/sequencer/intern/iterator.c index bb4982d1468..f99667dea04 100644 --- a/source/blender/sequencer/intern/iterator.c +++ b/source/blender/sequencer/intern/iterator.c @@ -75,31 +75,31 @@ static void seq_build_array(ListBase *seqbase, Sequence ***array, int depth) } static void seq_array(Editing *ed, - Sequence ***seqarray, - int *tot, - const bool use_current_sequences) + const bool use_current_sequences, + Sequence ***r_seqarray, + int *r_seqarray_len) { Sequence **array; - *seqarray = NULL; - *tot = 0; + *r_seqarray = NULL; + *r_seqarray_len = 0; if (ed == NULL) { return; } if (use_current_sequences) { - seq_count(ed->seqbasep, tot); + seq_count(ed->seqbasep, r_seqarray_len); } else { - seq_count(&ed->seqbase, tot); + seq_count(&ed->seqbase, r_seqarray_len); } - if (*tot == 0) { + if (*r_seqarray_len == 0) { return; } - *seqarray = array = MEM_mallocN(sizeof(Sequence *) * (*tot), "SeqArray"); + *r_seqarray = array = MEM_mallocN(sizeof(Sequence *) * (*r_seqarray_len), "SeqArray"); if (use_current_sequences) { seq_build_array(ed->seqbasep, &array, 0); } @@ -111,7 +111,7 @@ static void seq_array(Editing *ed, void SEQ_iterator_begin(Editing *ed, SeqIterator *iter, const bool use_current_sequences) { memset(iter, 0, sizeof(*iter)); - seq_array(ed, &iter->array, &iter->tot, use_current_sequences); + seq_array(ed, use_current_sequences, &iter->array, &iter->tot); if (iter->tot) { iter->cur = 0; diff --git a/source/blender/sequencer/intern/strip_select.c b/source/blender/sequencer/intern/strip_select.c index 58ae281ead1..7cdd756e2d9 100644 --- a/source/blender/sequencer/intern/strip_select.c +++ b/source/blender/sequencer/intern/strip_select.c @@ -54,29 +54,29 @@ void SEQ_select_active_set(Scene *scene, Sequence *seq) ed->act_seq = seq; } -int SEQ_select_active_get_pair(Scene *scene, Sequence **seq_act, Sequence **seq_other) +int SEQ_select_active_get_pair(Scene *scene, Sequence **r_seq_act, Sequence **r_seq_other) { Editing *ed = SEQ_editing_get(scene, false); - *seq_act = SEQ_select_active_get(scene); + *r_seq_act = SEQ_select_active_get(scene); - if (*seq_act == NULL) { + if (*r_seq_act == NULL) { return 0; } Sequence *seq; - *seq_other = NULL; + *r_seq_other = NULL; for (seq = ed->seqbasep->first; seq; seq = seq->next) { - if (seq->flag & SELECT && (seq != (*seq_act))) { - if (*seq_other) { + if (seq->flag & SELECT && (seq != (*r_seq_act))) { + if (*r_seq_other) { return 0; } - *seq_other = seq; + *r_seq_other = seq; } } - return (*seq_other != NULL); + return (*r_seq_other != NULL); } |