diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-19 17:28:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-19 17:28:19 +0400 |
commit | af3e348430218e609c80d86c8dd418bed15e70e8 (patch) | |
tree | a93e0453c8fe47a954594060cc5bbda90214a7f3 /source/blender/blenloader | |
parent | 2f5173887e0c7f6ba19664f16b177e575d82a241 (diff) |
code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 28 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_250.c | 4 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 8 |
3 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 01303eeb735..2b5eebb0f73 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5023,7 +5023,7 @@ static void direct_link_scene(FileData *fd, Scene *sce) seq->strip = newdataadr(fd, seq->strip); if (seq->strip && seq->strip->done==0) { - seq->strip->done = 1; + seq->strip->done = TRUE; if (seq->type == SEQ_IMAGE || seq->type == SEQ_MOVIE || @@ -5732,7 +5732,7 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype) ar->swinid = 0; ar->type = NULL; ar->swap = 0; - ar->do_draw = 0; + ar->do_draw = FALSE; memset(&ar->drawrct, 0, sizeof(ar->drawrct)); } @@ -8537,12 +8537,12 @@ static void expand_main(FileData *fd, Main *mainvar) { ListBase *lbarray[MAX_LIBARRAY]; ID *id; - int a, doit = 1; + int a, do_it = TRUE; if (fd == NULL) return; - while (doit) { - doit = 0; + while (do_it) { + do_it = FALSE; a = set_listbasepointers(mainvar, lbarray); while (a--) { @@ -8618,7 +8618,7 @@ static void expand_main(FileData *fd, Main *mainvar) break; } - doit = 1; + do_it = TRUE; id->flag -= LIB_TEST; } @@ -8655,15 +8655,15 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const * * (ob->id.flag & LIB_PRE_EXISTING)==0 means that this is a newly appended object - Campbell */ if (is_group_append==0 || (ob->id.flag & LIB_PRE_EXISTING)==0) { - int do_it= 0; + int do_it = FALSE; if (ob->id.us == 0) { - do_it = 1; + do_it = TRUE; } else if (idcode==ID_GR) { if (ob->id.us==1 && is_link==FALSE && ob->id.lib==lib) { if ((ob->flag & OB_FROMGROUP) && object_in_any_scene(mainvar, ob)==0) { - do_it = 1; + do_it = TRUE; } } } @@ -8675,7 +8675,7 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const * have a linked object which is not in any scene [#27616] */ if ((ob->id.flag & LIB_PRE_EXISTING)==0) { if (object_in_any_scene(mainvar, ob)==0) { - do_it = 1; + do_it = TRUE; } } } @@ -8971,10 +8971,10 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) Main *mainl = mainlist->first; Main *mainptr; ListBase *lbarray[MAX_LIBARRAY]; - int a, doit= 1; + int a, do_it = TRUE; - while (doit) { - doit = 0; + while (do_it) { + do_it = FALSE; /* test 1: read libdata */ mainptr= mainl->next; @@ -9040,7 +9040,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) } } if (fd) { - doit = 1; + do_it = TRUE; a = set_listbasepointers(mainptr, lbarray); while (a--) { ID *id = lbarray[a]->first; diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 8a8705532cb..4cf17b2c24c 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -1084,7 +1084,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main) World *wo; Tex *tex; ParticleSettings *part; - int do_gravity = 0; + int do_gravity = FALSE; for (sce = main->scene.first; sce; sce = sce->id.next) if (sce->unit.scale_length == 0.0f) @@ -1140,7 +1140,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main) sce->physics_settings.gravity[0] = sce->physics_settings.gravity[1] = 0.0f; sce->physics_settings.gravity[2] = -9.81f; sce->physics_settings.flag = PHYS_GLOBAL_GRAVITY; - do_gravity = 1; + do_gravity = TRUE; } } diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index f065ae238a6..02ebc91f191 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2141,7 +2141,7 @@ static void write_scenes(WriteData *wd, ListBase *scebase) SEQ_BEGIN (ed, seq) { - if (seq->strip) seq->strip->done= 0; + if (seq->strip) seq->strip->done = FALSE; writestruct(wd, DATA, "Sequence", 1, seq); } SEQ_END @@ -2191,7 +2191,7 @@ static void write_scenes(WriteData *wd, ListBase *scebase) else if (seq->type==SEQ_MOVIE || seq->type==SEQ_RAM_SOUND || seq->type == SEQ_HD_SOUND) writestruct(wd, DATA, "StripElem", 1, strip->stripdata); - strip->done= 1; + strip->done = TRUE; } } SEQ_END @@ -2467,11 +2467,11 @@ static void write_libraries(WriteData *wd, Main *main) a=tot= set_listbasepointers(main, lbarray); /* test: is lib being used */ - foundone= 0; + foundone = FALSE; while (tot--) { for (id= lbarray[tot]->first; id; id= id->next) { if (id->us>0 && (id->flag & LIB_EXTERN)) { - foundone= 1; + foundone = TRUE; break; } } |