diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-13 12:25:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-13 12:32:15 +0300 |
commit | a8f9a2493915bf9384553b3933593a5296e70a1c (patch) | |
tree | b92994b73297c1f9bb439c1d38dae373985065b7 /source/blender/imbuf/IMB_imbuf_types.h | |
parent | 4a3b26dd5e7fc0fb0d95271859ee7b780add2a88 (diff) |
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.
Diffstat (limited to 'source/blender/imbuf/IMB_imbuf_types.h')
-rw-r--r-- | source/blender/imbuf/IMB_imbuf_types.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index 98e9c34a4ff..4bb3ea500fa 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -69,7 +69,7 @@ typedef struct DDSData { * See T46524. */ /** #ImBuf.ftype flag, main image types. */ -enum eImbTypes { +enum eImbFileType { IMB_FTYPE_PNG = 1, IMB_FTYPE_TGA = 2, IMB_FTYPE_JPG = 3, @@ -98,6 +98,9 @@ enum eImbTypes { #endif }; +/* Only for readability. */ +#define IMB_FTYPE_NONE 0 + /* ibuf->foptions flag, type specific options. * Some formats include compression rations on some bits */ @@ -243,7 +246,7 @@ typedef struct ImBuf { /* file information */ /** file type we are going to save as */ - enum eImbTypes ftype; + enum eImbFileType ftype; /** file format specific flags */ ImbFormatOptions foptions; /** filename associated with this image */ |