diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:18:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:18:31 +0400 |
commit | 69e6894b15271884623ea6f56ead06db83acbe99 (patch) | |
tree | b68200606afaca06cf7552f6b12fc20ebd30d487 /source/blender/blenloader/intern/undofile.c | |
parent | 7b99ae0ad3017e373be2a344e30d190b70ca66b4 (diff) |
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
Diffstat (limited to 'source/blender/blenloader/intern/undofile.c')
-rw-r--r-- | source/blender/blenloader/intern/undofile.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c index 03c5070c8f3..eeeaae937b1 100644 --- a/source/blender/blenloader/intern/undofile.c +++ b/source/blender/blenloader/intern/undofile.c @@ -55,8 +55,8 @@ void BLO_free_memfile(MemFile *memfile) { MemFileChunk *chunk; - while( (chunk = (memfile->chunks.first) ) ) { - if(chunk->ident==0) MEM_freeN(chunk->buf); + while ( (chunk = (memfile->chunks.first) ) ) { + if (chunk->ident==0) MEM_freeN(chunk->buf); BLI_remlink(&memfile->chunks, chunk); MEM_freeN(chunk); } @@ -72,14 +72,14 @@ void BLO_merge_memfile(MemFile *first, MemFile *second) fc= first->chunks.first; sc= second->chunks.first; while (fc || sc) { - if(fc && sc) { - if(sc->ident) { + if (fc && sc) { + if (sc->ident) { sc->ident= 0; fc->ident= 1; } } - if(fc) fc= fc->next; - if(sc) sc= sc->next; + if (fc) fc= fc->next; + if (sc) sc= sc->next; } BLO_free_memfile(first); @@ -89,8 +89,8 @@ static int my_memcmp(int *mem1, int *mem2, int len) { register int a= len, *mema= mem1, *memb= mem2; - while(a--) { - if( *mema != *memb) return 1; + while (a--) { + if ( *mema != *memb) return 1; mema++; memb++; } @@ -103,11 +103,11 @@ void add_memfilechunk(MemFile *compare, MemFile *current, char *buf, unsigned in MemFileChunk *curchunk; /* this function inits when compare != NULL or when current==NULL */ - if(compare) { + if (compare) { compchunk= compare->chunks.first; return; } - if(current==NULL) { + if (current==NULL) { compchunk= NULL; return; } @@ -119,9 +119,9 @@ void add_memfilechunk(MemFile *compare, MemFile *current, char *buf, unsigned in BLI_addtail(¤t->chunks, curchunk); /* we compare compchunk with buf */ - if(compchunk) { - if(compchunk->size == curchunk->size) { - if( my_memcmp((int *)compchunk->buf, (int *)buf, size/4)==0) { + if (compchunk) { + if (compchunk->size == curchunk->size) { + if ( my_memcmp((int *)compchunk->buf, (int *)buf, size/4)==0) { curchunk->buf= compchunk->buf; curchunk->ident= 1; } @@ -130,7 +130,7 @@ void add_memfilechunk(MemFile *compare, MemFile *current, char *buf, unsigned in } /* not equal... */ - if(curchunk->buf==NULL) { + if (curchunk->buf==NULL) { curchunk->buf= MEM_mallocN(size, "Chunk buffer"); memcpy(curchunk->buf, buf, size); current->size += size; |