diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-30 20:09:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-30 20:30:05 +0400 |
commit | 3c86a1932f848f694ba3a88bb1af35325f3f89a2 (patch) | |
tree | 2b2fa7c9ea70436f5e650673c12300290dfd0f34 /source/blender/editors/space_file/filelist.c | |
parent | 0cb49286ce45f1b2ce16db0e174170ef2a671dba (diff) |
Code cleanup: add BLI_testextensie_n, replacing multuple calls to BLI_testextensie
also use attributes for BLI path functions
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 7282b024399..9e674b34d36 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -789,19 +789,10 @@ static int path_extension_type(const char *path) else if (BLI_testextensie(path, ".py")) { return PYSCRIPTFILE; } - else if (BLI_testextensie(path, ".txt") || - BLI_testextensie(path, ".glsl") || - BLI_testextensie(path, ".osl") || - BLI_testextensie(path, ".data")) - { + else if (BLI_testextensie_n(path, ".txt", ".glsl", ".osl", ".data", NULL)) { return TEXTFILE; } - else if (BLI_testextensie(path, ".ttf") || - BLI_testextensie(path, ".ttc") || - BLI_testextensie(path, ".pfb") || - BLI_testextensie(path, ".otf") || - BLI_testextensie(path, ".otc")) - { + else if (BLI_testextensie_n(path, ".ttf", ".ttc", ".pfb", ".otf", ".otc", NULL)) { return FTFONTFILE; } else if (BLI_testextensie(path, ".btx")) { |