diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-03-31 09:05:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-03-31 09:05:57 +0300 |
commit | b547ac32d94e988a5514dc1e79f2d7181a5385d5 (patch) | |
tree | a186960d5e6997ff154218960783d1f26e925059 /source/blender/imbuf/intern/cineon | |
parent | e7f890aa59add3b0d83fd56c7423aa58cdd30f65 (diff) |
Cleanup: use early return for imbuf image loader functions
Most imbuf loaders already did this, use early exit for the remaining
loaders that didn't.
Diffstat (limited to 'source/blender/imbuf/intern/cineon')
-rw-r--r-- | source/blender/imbuf/intern/cineon/cineon_dpx.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c index de54e6dab9d..91d7b9a8b9e 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.c +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c @@ -198,10 +198,10 @@ ImBuf *imb_load_cineon(const unsigned char *mem, int flags, char colorspace[IM_MAX_SPACE]) { - if (imb_is_a_cineon(mem, size)) { - return imb_load_dpx_cineon(mem, size, 1, flags, colorspace); + if (!imb_is_a_cineon(mem, size)) { + return NULL; } - return NULL; + return imb_load_dpx_cineon(mem, size, 1, flags, colorspace); } bool imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags) @@ -219,8 +219,8 @@ ImBuf *imb_load_dpx(const unsigned char *mem, int flags, char colorspace[IM_MAX_SPACE]) { - if (imb_is_a_dpx(mem, size)) { - return imb_load_dpx_cineon(mem, size, 0, flags, colorspace); + if (!imb_is_a_dpx(mem, size)) { + return NULL; } - return NULL; + return imb_load_dpx_cineon(mem, size, 0, flags, colorspace); } |