Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-11 08:14:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-11 08:14:05 +0300
commita5f8071bdf7893ef487c677b460793e8bef55402 (patch)
tree50593a4a3f98a0fb0975e2346c6c78c55823eafb /source/blender/imbuf/intern/jp2.c
parente9c19b28202eb1fdc774d62f23896bf9fafb0fb8 (diff)
Cleanup: use bool for imbuf save callbacks
Diffstat (limited to 'source/blender/imbuf/intern/jp2.c')
-rw-r--r--source/blender/imbuf/intern/jp2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index 97af0eb8feb..f0486852d6f 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -1194,22 +1194,22 @@ static opj_image_t *ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters)
return image;
}
-int imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int flags);
+bool imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int flags);
-int imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags)
+bool imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags)
{
opj_stream_t *stream = opj_stream_create_from_file(
filepath, OPJ_J2K_STREAM_CHUNK_SIZE, false, NULL);
if (stream == NULL) {
return 0;
}
- int ret = imb_save_jp2_stream(ibuf, stream, flags);
+ const bool ok = imb_save_jp2_stream(ibuf, stream, flags);
opj_stream_destroy(stream);
- return ret;
+ return ok;
}
/* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */
-int imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int UNUSED(flags))
+bool imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int UNUSED(flags))
{
int quality = ibuf->foptions.quality;
@@ -1230,7 +1230,7 @@ int imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int UNUSED(fla
image = ibuftoimage(ibuf, &parameters);
opj_codec_t *codec = NULL;
- int ok = false;
+ bool ok = false;
/* JP2 format output */
{
/* get a JP2 compressor handle */