diff options
author | Campbell Barton <campbell@blender.org> | 2022-11-04 10:37:25 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-11-05 05:47:01 +0300 |
commit | ae3073323e92a1773fb253bd1c5d6c92b826e1e0 (patch) | |
tree | 0c2c63d40bbb0b83c6604f8b4e40e8f46ab0047e /source/blender/imbuf | |
parent | 4a313b82529b95aa267086ca0c4f113e65bb79c8 (diff) |
Cleanup: use bool instead of short for job stop & do_update arguments
Since these values are only ever 0/1, use bool type.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/IMB_imbuf.h | 6 | ||||
-rw-r--r-- | source/blender/imbuf/intern/indexer.c | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 5c76dfe52df..a05bc51fcea 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -358,14 +358,14 @@ struct IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, * Will rebuild all used indices and proxies at once. */ void IMB_anim_index_rebuild(struct IndexBuildContext *context, - short *stop, - short *do_update, + bool *stop, + bool *do_update, float *progress); /** * Finish rebuilding proxies/time-codes and free temporary contexts used. */ -void IMB_anim_index_rebuild_finish(struct IndexBuildContext *context, short stop); +void IMB_anim_index_rebuild_finish(struct IndexBuildContext *context, bool stop); /** * Return the length (in frames) of the given \a anim. diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index 63836690ee4..d824b87f493 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -931,7 +931,7 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim, return (IndexBuildContext *)context; } -static void index_rebuild_ffmpeg_finish(FFmpegIndexBuilderContext *context, int stop) +static void index_rebuild_ffmpeg_finish(FFmpegIndexBuilderContext *context, const bool stop) { int i; @@ -1012,8 +1012,8 @@ static void index_rebuild_ffmpeg_proc_decoded_frame(FFmpegIndexBuilderContext *c } static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context, - const short *stop, - short *do_update, + const bool *stop, + bool *do_update, float *progress) { AVFrame *in_frame = av_frame_alloc(); @@ -1303,7 +1303,7 @@ static IndexBuildContext *index_fallback_create_context(struct anim *anim, return (IndexBuildContext *)context; } -static void index_rebuild_fallback_finish(FallbackIndexBuilderContext *context, int stop) +static void index_rebuild_fallback_finish(FallbackIndexBuilderContext *context, const bool stop) { struct anim *anim = context->anim; char filepath[FILE_MAX]; @@ -1330,8 +1330,8 @@ static void index_rebuild_fallback_finish(FallbackIndexBuilderContext *context, } static void index_rebuild_fallback(FallbackIndexBuilderContext *context, - const short *stop, - short *do_update, + const bool *stop, + bool *do_update, float *progress) { int count = IMB_anim_get_duration(context->anim, IMB_TC_NONE); @@ -1470,9 +1470,9 @@ IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, void IMB_anim_index_rebuild(struct IndexBuildContext *context, /* NOLINTNEXTLINE: readability-non-const-parameter. */ - short *stop, + bool *stop, /* NOLINTNEXTLINE: readability-non-const-parameter. */ - short *do_update, + bool *do_update, /* NOLINTNEXTLINE: readability-non-const-parameter. */ float *progress) { @@ -1494,7 +1494,7 @@ void IMB_anim_index_rebuild(struct IndexBuildContext *context, UNUSED_VARS(stop, do_update, progress); } -void IMB_anim_index_rebuild_finish(IndexBuildContext *context, short stop) +void IMB_anim_index_rebuild_finish(IndexBuildContext *context, const bool stop) { switch (context->anim_type) { #ifdef WITH_FFMPEG |