Cleanup: quiet warnings, remove unused arguments

This commit is contained in:
Campbell Barton 2022-06-02 13:47:02 +10:00
parent 7afcfe111a
commit ef3f33dfd3
5 changed files with 15 additions and 15 deletions

View File

@ -786,7 +786,6 @@ static void seq_build_proxy(bContext *C, SeqCollection *movie_strips)
}
static void sequencer_add_movie_clamp_sound_strip_length(Scene *scene,
ListBase *seqbase,
Sequence *seq_movie,
Sequence *seq_sound)
{
@ -833,7 +832,7 @@ static void sequencer_add_movie_multiple_strips(bContext *C,
else {
if (RNA_boolean_get(op->ptr, "sound")) {
seq_sound = SEQ_add_sound_strip(bmain, scene, ed->seqbasep, load_data);
sequencer_add_movie_clamp_sound_strip_length(scene, ed->seqbasep, seq_movie, seq_sound);
sequencer_add_movie_clamp_sound_strip_length(scene, seq_movie, seq_sound);
if (seq_sound) {
/* The video has sound, shift the video strip up a channel to make room for the sound
@ -891,7 +890,7 @@ static bool sequencer_add_movie_single_strip(bContext *C,
}
if (RNA_boolean_get(op->ptr, "sound")) {
seq_sound = SEQ_add_sound_strip(bmain, scene, ed->seqbasep, load_data);
sequencer_add_movie_clamp_sound_strip_length(scene, ed->seqbasep, seq_movie, seq_sound);
sequencer_add_movie_clamp_sound_strip_length(scene, seq_movie, seq_sound);
if (seq_sound) {
/* The video has sound, shift the video strip up a channel to make room for the sound
* strip. */

View File

@ -131,6 +131,9 @@ bool SEQ_collection_remove_strip(struct Sequence *seq, SeqCollection *collection
* \param collection: collection to be freed
*/
void SEQ_collection_free(SeqCollection *collection);
/** Quiet compiler warning for free function. */
#define SEQ_collection_free_void_p ((GHashValFreeFP)SEQ_collection_free)
/**
* Move strips from collection_src to collection_dst. Source collection will be freed.
*

View File

@ -104,7 +104,7 @@ static void seq_sequence_lookup_free(struct SequenceLookup **lookup)
BLI_ghash_free((*lookup)->seq_by_name, NULL, NULL);
BLI_ghash_free((*lookup)->meta_by_seq, NULL, NULL);
BLI_ghash_free((*lookup)->effects_by_seq, NULL, SEQ_collection_free);
BLI_ghash_free((*lookup)->effects_by_seq, NULL, SEQ_collection_free_void_p);
(*lookup)->seq_by_name = NULL;
(*lookup)->meta_by_seq = NULL;
(*lookup)->effects_by_seq = NULL;

View File

@ -72,7 +72,7 @@ void SEQ_add_load_data_init(SeqLoadData *load_data,
load_data->channel = channel;
}
static void seq_add_generic_update(Scene *scene, ListBase *seqbase, Sequence *seq)
static void seq_add_generic_update(Scene *scene, Sequence *seq)
{
SEQ_sequence_base_unique_name_recursive(scene, &scene->ed->seqbase, seq);
SEQ_relations_invalidate_cache_composite(scene, seq);
@ -130,7 +130,7 @@ Sequence *SEQ_add_scene_strip(Scene *scene, ListBase *seqbase, struct SeqLoadDat
seq->len = load_data->scene->r.efra - load_data->scene->r.sfra + 1;
id_us_ensure_real((ID *)load_data->scene);
seq_add_set_name(scene, seq, load_data);
seq_add_generic_update(scene, seqbase, seq);
seq_add_generic_update(scene, seq);
return seq;
}
@ -142,7 +142,7 @@ Sequence *SEQ_add_movieclip_strip(Scene *scene, ListBase *seqbase, struct SeqLoa
seq->len = BKE_movieclip_get_duration(load_data->clip);
id_us_ensure_real((ID *)load_data->clip);
seq_add_set_name(scene, seq, load_data);
seq_add_generic_update(scene, seqbase, seq);
seq_add_generic_update(scene, seq);
return seq;
}
@ -154,7 +154,7 @@ Sequence *SEQ_add_mask_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData
seq->len = BKE_mask_get_duration(load_data->mask);
id_us_ensure_real((ID *)load_data->mask);
seq_add_set_name(scene, seq, load_data);
seq_add_generic_update(scene, seqbase, seq);
seq_add_generic_update(scene, seq);
return seq;
}
@ -180,7 +180,7 @@ Sequence *SEQ_add_effect_strip(Scene *scene, ListBase *seqbase, struct SeqLoadDa
}
seq_add_set_name(scene, seq, load_data);
seq_add_generic_update(scene, seqbase, seq);
seq_add_generic_update(scene, seq);
seq_time_effect_range_set(seq);
return seq;
@ -267,7 +267,7 @@ Sequence *SEQ_add_image_strip(Main *bmain, Scene *scene, ListBase *seqbase, SeqL
BLI_strncpy(scene->ed->act_imagedir, seq->strip->dir, sizeof(scene->ed->act_imagedir));
seq_add_set_view_transform(scene, seq, load_data);
seq_add_set_name(scene, seq, load_data);
seq_add_generic_update(scene, seqbase, seq);
seq_add_generic_update(scene, seq);
return seq;
}
@ -338,7 +338,7 @@ Sequence *SEQ_add_sound_strip(Main *bmain, Scene *scene, ListBase *seqbase, SeqL
/* Set Last active directory. */
BLI_strncpy(scene->ed->act_sounddir, strip->dir, FILE_MAXDIR);
seq_add_set_name(scene, seq, load_data);
seq_add_generic_update(scene, seqbase, seq);
seq_add_generic_update(scene, seq);
return seq;
}
@ -486,7 +486,7 @@ Sequence *SEQ_add_movie_strip(Main *bmain, Scene *scene, ListBase *seqbase, SeqL
seq_add_set_view_transform(scene, seq, load_data);
seq_add_set_name(scene, seq, load_data);
seq_add_generic_update(scene, seqbase, seq);
seq_add_generic_update(scene, seq);
MEM_freeN(anim_arr);
return seq;

View File

@ -347,7 +347,6 @@ static bool seq_edit_split_effect_intersect_check(const Sequence *seq, const int
static void seq_edit_split_handle_strip_offsets(Main *bmain,
Scene *scene,
ListBase *seqbase,
Sequence *left_seq,
Sequence *right_seq,
const int timeline_frame,
@ -499,8 +498,7 @@ Sequence *SEQ_edit_strip_split(Main *bmain,
return_seq = right_seq;
}
seq_edit_split_handle_strip_offsets(
bmain, scene, seqbase, left_seq, right_seq, timeline_frame, method);
seq_edit_split_handle_strip_offsets(bmain, scene, left_seq, right_seq, timeline_frame, method);
left_seq = left_seq->next;
right_seq = right_seq->next;
}