Cleanup: Clang-tidy warnings
This commit is contained in:
@@ -1393,7 +1393,7 @@ static float seq_thumbnail_get_start_frame(Sequence *seq, float frame_step, rctf
|
|||||||
return ((no_invisible_thumbs - 1) * frame_step) + seq->start;
|
return ((no_invisible_thumbs - 1) * frame_step) + seq->start;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void thumbnail_start_job(void *data, short *stop, short *do_update, float *progress)
|
static void thumbnail_start_job(void *data, const short *stop, const short *do_update, const float *progress)
|
||||||
{
|
{
|
||||||
ThumbnailDrawJob *tj = data;
|
ThumbnailDrawJob *tj = data;
|
||||||
float start_frame, frame_step;
|
float start_frame, frame_step;
|
||||||
@@ -1627,24 +1627,28 @@ static ImBuf *sequencer_thumbnail_closest_from_memory(const SeqRenderData *conte
|
|||||||
int frame_guaranteed = sequencer_thumbnail_closest_guaranteed_frame_get(seq, timeline_frame);
|
int frame_guaranteed = sequencer_thumbnail_closest_guaranteed_frame_get(seq, timeline_frame);
|
||||||
ImBuf *ibuf_guaranteed = SEQ_get_thumbnail(context, seq, frame_guaranteed, crop, clipped);
|
ImBuf *ibuf_guaranteed = SEQ_get_thumbnail(context, seq, frame_guaranteed, crop, clipped);
|
||||||
|
|
||||||
if (ibuf_previous && ibuf_guaranteed &&
|
ImBuf *closest_in_memory = NULL;
|
||||||
abs(frame_previous - timeline_frame) < abs(frame_guaranteed - timeline_frame)) {
|
|
||||||
|
|
||||||
IMB_freeImBuf(ibuf_guaranteed);
|
if (ibuf_previous && ibuf_guaranteed) {
|
||||||
return ibuf_previous;
|
if (abs(frame_previous - timeline_frame) < abs(frame_guaranteed - timeline_frame)) {
|
||||||
}
|
IMB_freeImBuf(ibuf_guaranteed);
|
||||||
else {
|
closest_in_memory = ibuf_previous;
|
||||||
IMB_freeImBuf(ibuf_previous);
|
}
|
||||||
return ibuf_guaranteed;
|
else {
|
||||||
|
IMB_freeImBuf(ibuf_previous);
|
||||||
|
closest_in_memory = ibuf_guaranteed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ibuf_previous == NULL) {
|
if (ibuf_previous == NULL) {
|
||||||
return ibuf_guaranteed;
|
closest_in_memory = ibuf_guaranteed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ibuf_guaranteed == NULL) {
|
if (ibuf_guaranteed == NULL) {
|
||||||
return ibuf_previous;
|
closest_in_memory = ibuf_previous;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return closest_in_memory;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void draw_seq_strip_thumbnail(View2D *v2d,
|
static void draw_seq_strip_thumbnail(View2D *v2d,
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ void SEQ_render_thumbnails(const struct SeqRenderData *context,
|
|||||||
float start_frame,
|
float start_frame,
|
||||||
float frame_step,
|
float frame_step,
|
||||||
rctf *view_area,
|
rctf *view_area,
|
||||||
short *stop);
|
const short *stop);
|
||||||
struct ImBuf *SEQ_get_thumbnail(const struct SeqRenderData *context,
|
struct ImBuf *SEQ_get_thumbnail(const struct SeqRenderData *context,
|
||||||
struct Sequence *seq,
|
struct Sequence *seq,
|
||||||
float timeline_frame,
|
float timeline_frame,
|
||||||
@@ -86,7 +86,7 @@ void SEQ_render_thumbnails_base_set(const struct SeqRenderData *context,
|
|||||||
struct Sequence *seq,
|
struct Sequence *seq,
|
||||||
struct Sequence *seq_orig,
|
struct Sequence *seq_orig,
|
||||||
rctf *view_area,
|
rctf *view_area,
|
||||||
short *stop);
|
const short *stop);
|
||||||
|
|
||||||
void SEQ_render_init_colorspace(struct Sequence *seq);
|
void SEQ_render_init_colorspace(struct Sequence *seq);
|
||||||
void SEQ_render_new_render_data(struct Main *bmain,
|
void SEQ_render_new_render_data(struct Main *bmain,
|
||||||
|
|||||||
@@ -1990,7 +1990,7 @@ void SEQ_render_thumbnails(const SeqRenderData *context,
|
|||||||
float start_frame,
|
float start_frame,
|
||||||
float frame_step,
|
float frame_step,
|
||||||
rctf *view_area,
|
rctf *view_area,
|
||||||
short *stop)
|
const short *stop)
|
||||||
{
|
{
|
||||||
SeqRenderState state;
|
SeqRenderState state;
|
||||||
seq_render_state_init(&state);
|
seq_render_state_init(&state);
|
||||||
@@ -2044,7 +2044,7 @@ int SEQ_render_thumbnails_guaranteed_set_frame_step_get(const Sequence *seq)
|
|||||||
|
|
||||||
/* Render set of evenly spaced thumbnails that are drawn when zooming. */
|
/* Render set of evenly spaced thumbnails that are drawn when zooming. */
|
||||||
void SEQ_render_thumbnails_base_set(
|
void SEQ_render_thumbnails_base_set(
|
||||||
const SeqRenderData *context, Sequence *seq, Sequence *seq_orig, rctf *view_area, short *stop)
|
const SeqRenderData *context, Sequence *seq, Sequence *seq_orig, rctf *view_area, const short *stop)
|
||||||
{
|
{
|
||||||
SeqRenderState state;
|
SeqRenderState state;
|
||||||
seq_render_state_init(&state);
|
seq_render_state_init(&state);
|
||||||
|
|||||||
Reference in New Issue
Block a user