diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-13 03:24:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-13 03:28:24 +0300 |
commit | 454b7876ff18c5103cad7d1ebc4e7bef5b1bff4b (patch) | |
tree | 81040e9e44f6fbf50f377e1618caf17088980b5c /source/blender/imbuf/intern/IMB_filetype.h | |
parent | ac299bb45328da8dc3586be25bcff78ddfc2e03a (diff) |
Cleanup: remove unnecessary ImFileType.ftype callback
This callback made some sense before moving the file-type information
from a bit-flag to an enum: e142ae77cadf04103fbc643f21cf60891862f6a8
Since then, we can compare the type value directly.
Also replace loops over file types with IMB_file_type_from_{ibuf/ftype}.
Diffstat (limited to 'source/blender/imbuf/intern/IMB_filetype.h')
-rw-r--r-- | source/blender/imbuf/intern/IMB_filetype.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h index 7bdbbb03227..175d973de9a 100644 --- a/source/blender/imbuf/intern/IMB_filetype.h +++ b/source/blender/imbuf/intern/IMB_filetype.h @@ -33,7 +33,6 @@ typedef struct ImFileType { void (*exit)(void); bool (*is_a)(const unsigned char *buf, const size_t size); - int (*ftype)(const struct ImFileType *type, const struct ImBuf *ibuf); struct ImBuf *(*load)(const unsigned char *mem, size_t size, int flags, @@ -55,6 +54,9 @@ typedef struct ImFileType { extern const ImFileType IMB_FILE_TYPES[]; extern const ImFileType *IMB_FILE_TYPES_LAST; +const ImFileType *IMB_file_type_from_ftype(int ftype); +const ImFileType *IMB_file_type_from_ibuf(const struct ImBuf *ibuf); + void imb_filetypes_init(void); void imb_filetypes_exit(void); |