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.
This commit is contained in:
2020-11-13 20:25:21 +11:00
parent 4a3b26dd5e
commit a8f9a24939
7 changed files with 28 additions and 10 deletions

View File

@@ -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) {