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/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/image.c') diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 9010c846954..cd2ed32cd4f 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1341,7 +1341,7 @@ int BKE_image_imtype_to_ftype(const char imtype, ImbFormatOptions *r_options) char BKE_image_ftype_to_imtype(const int ftype, const ImbFormatOptions *options) { - if (ftype == 0) { + if (ftype == IMB_FTYPE_NONE) { return R_IMF_IMTYPE_TARGA; } if (ftype == IMB_FTYPE_IMAGIC) { -- cgit v1.2.3