diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-07-19 19:30:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-07-19 19:33:40 +0400 |
commit | 00b29156e087bba3675c7247ffe64a1696a90558 (patch) | |
tree | 334d5be951b6d69873908dfdfe6b29439788aaab /source/blender/blenloader | |
parent | 7e8626bbcec21c682dc9159fe0307d157c56ede4 (diff) |
Defines: replace ELEM3-16 with ELEM(...), that can take varargs
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 6 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_260.c | 6 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_legacy.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 91753158d02..419f72b5fd6 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2664,9 +2664,9 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) } } else if (ntree->type==NTREE_COMPOSIT) { - if (ELEM4(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT)) + if (ELEM(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT)) direct_link_curvemapping(fd, node->storage); - else if (ELEM3(node->type, CMP_NODE_IMAGE, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) + else if (ELEM(node->type, CMP_NODE_IMAGE, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) ((ImageUser *)node->storage)->ok = 1; } else if ( ntree->type==NTREE_TEXTURE) { @@ -5355,7 +5355,7 @@ static void direct_link_scene(FileData *fd, Scene *sce) if (seq->strip && seq->strip->done==0) { seq->strip->done = true; - if (ELEM4(seq->type, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD)) { + if (ELEM(seq->type, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD)) { seq->strip->stripdata = newdataadr(fd, seq->strip->stripdata); } else { diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 3890e07bb65..7c6b6ec7249 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -2454,9 +2454,9 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *main) if (sl->spacetype == SPACE_OUTLINER) { SpaceOops *so = (SpaceOops *)sl; - if (!ELEM11(so->outlinevis, SO_ALL_SCENES, SO_CUR_SCENE, SO_VISIBLE, SO_SELECTED, SO_ACTIVE, - SO_SAME_TYPE, SO_GROUPS, SO_LIBRARIES, SO_SEQUENCE, SO_DATABLOCKS, - SO_USERDEF)) + if (!ELEM(so->outlinevis, SO_ALL_SCENES, SO_CUR_SCENE, SO_VISIBLE, SO_SELECTED, SO_ACTIVE, + SO_SAME_TYPE, SO_GROUPS, SO_LIBRARIES, SO_SEQUENCE, SO_DATABLOCKS, + SO_USERDEF)) { so->outlinevis = SO_ALL_SCENES; } diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 572c6d0a02d..b73e1feb0c1 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -473,7 +473,7 @@ static void do_version_ntree_242_2(bNodeTree *ntree) if (ntree->type == NTREE_COMPOSIT) { for (node = ntree->nodes.first; node; node = node->next) { - if (ELEM3(node->type, CMP_NODE_IMAGE, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) { + if (ELEM(node->type, CMP_NODE_IMAGE, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) { /* only image had storage */ if (node->storage) { NodeImageAnim *nia = node->storage; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index a0198a687a2..63ca7bf0a06 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -767,7 +767,7 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree) writedata(wd, DATA, strlen(nss->bytecode)+1, nss->bytecode); writestruct(wd, DATA, node->typeinfo->storagename, 1, node->storage); } - else if (ntree->type==NTREE_COMPOSIT && ELEM4(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT)) + else if (ntree->type==NTREE_COMPOSIT && ELEM(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT)) write_curvemapping(wd, node->storage); else if (ntree->type==NTREE_TEXTURE && (node->type==TEX_NODE_CURVE_RGB || node->type==TEX_NODE_CURVE_TIME) ) write_curvemapping(wd, node->storage); |