From b547ac32d94e988a5514dc1e79f2d7181a5385d5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 31 Mar 2021 17:05:57 +1100 Subject: 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. --- source/blender/imbuf/intern/cineon/cineon_dpx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/imbuf/intern/cineon') 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); } -- cgit v1.2.3