From a8f9a2493915bf9384553b3933593a5296e70a1c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 13 Nov 2020 20:25:21 +1100 Subject: Cleanup: use IMB_FTYPE_NONE instead of 0 for imbuf format comparison Image format code checked the file type against an enum except for zero which is used when the format can't be detected. Also add doc-strings to some of the image file type callbacks. --- source/blender/blenkernel/intern/packedFile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/packedFile.c') diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index e99dd77005b..87239d160b4 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -536,8 +536,8 @@ static void unpack_generate_paths(const char *name, ImagePackedFile *imapf = ((Image *)id)->packedfiles.last; if (imapf != NULL && imapf->packedfile != NULL) { const PackedFile *pf = imapf->packedfile; - const int ftype = IMB_ispic_type_from_memory((const uchar *)pf->data, pf->size); - if (ftype != 0) { + enum eImbFileType ftype = IMB_ispic_type_from_memory((const uchar *)pf->data, pf->size); + if (ftype != IMB_FTYPE_NONE) { const int imtype = BKE_image_ftype_to_imtype(ftype, NULL); BKE_image_path_ensure_ext_from_imtype(tempname, imtype); } -- cgit v1.2.3