Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-13 03:24:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-13 03:28:24 +0300
commit454b7876ff18c5103cad7d1ebc4e7bef5b1bff4b (patch)
tree81040e9e44f6fbf50f377e1618caf17088980b5c /source/blender/imbuf/intern/readimage.c
parentac299bb45328da8dc3586be25bcff78ddfc2e03a (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/readimage.c')
-rw-r--r--source/blender/imbuf/intern/readimage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index 8b322eaf052..f0daa4543e1 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -282,7 +282,6 @@ ImBuf *IMB_testiffname(const char *filepath, int flags)
static void imb_loadtilefile(ImBuf *ibuf, int file, int tx, int ty, unsigned int *rect)
{
- const ImFileType *type;
unsigned char *mem;
size_t size;
@@ -301,8 +300,9 @@ static void imb_loadtilefile(ImBuf *ibuf, int file, int tx, int ty, unsigned int
return;
}
- for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) {
- if (type->load_tile && type->ftype(type, ibuf)) {
+ const ImFileType *type = IMB_file_type_from_ibuf(ibuf);
+ if (type != NULL) {
+ if (type->load_tile != NULL) {
type->load_tile(ibuf, mem, size, tx, ty, rect);
}
}