diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-23 19:10:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-24 09:09:24 +0300 |
commit | fcda27cdaedfcf79607b13dbf5c6fe670e95d2ac (patch) | |
tree | b2c1e96fd987bc0e8d7fb5d3c120cca2d1793717 /source/blender/blenkernel/intern | |
parent | ae213d740da1416df229e06616c883d979cfd640 (diff) |
Cleanup: style
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 13 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mball.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_distribute.c | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 6 |
5 files changed, 24 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 34877c7559c..f8c79832dfc 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -161,21 +161,24 @@ static AdrBit2Path ma_mode_bits[] = { { \ *tot = sizeof(items) / sizeof(AdrBit2Path); \ return items; \ - } + } (void)0 /* This function checks if a Blocktype+Adrcode combo, returning a mapping table */ static AdrBit2Path *adrcode_bitmaps_to_paths(int blocktype, int adrcode, int *tot) { /* Object layers */ - if ((blocktype == ID_OB) && (adrcode == OB_LAY)) - RET_ABP(ob_layer_bits) - else if ((blocktype == ID_MA) && (adrcode == MA_MODE)) - RET_ABP(ma_mode_bits) + if ((blocktype == ID_OB) && (adrcode == OB_LAY)) { + RET_ABP(ob_layer_bits); + } + else if ((blocktype == ID_MA) && (adrcode == MA_MODE)) { + RET_ABP(ma_mode_bits); + } // XXX TODO: add other types... /* Normal curve */ return NULL; } +#undef RET_ABP /* *************************************************** */ /* ADRCODE to RNA-Path Conversion Code - Standard */ diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 34ab2a85593..5649164a273 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -913,7 +913,11 @@ static void docube(PROCESS *process, CUBE *cube, MetaBall *mb) CORNER *c1, *c2; int i, index = 0, count, indexar[8]; - for (i = 0; i < 8; i++) if (cube->corners[i]->value > 0.0f) index += (1 << i); + for (i = 0; i < 8; i++) { + if (cube->corners[i]->value > 0.0f) { + index += (1 << i); + } + } for (polys = cubetable[index]; polys; polys = polys->next) { INTLIST *edges; diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c index 7a422abae47..6cc42e85a12 100644 --- a/source/blender/blenkernel/intern/particle_distribute.c +++ b/source/blender/blenkernel/intern/particle_distribute.c @@ -651,8 +651,11 @@ static void distribute_children_exec(ParticleTask *thread, ChildParticle *cpa, i cpa->w[i]=0.0f; } - if (totw>0.0f) for (w=0; w<4; w++) - cpa->w[w]/=totw; + if (totw > 0.0f) { + for (w = 0; w < 4; w++) { + cpa->w[w] /= totw; + } + } cpa->parent=cpa->pa[0]; } diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 88720d5fcb7..43daaf2120c 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -687,8 +687,7 @@ void sound_free_waveform(bSound *sound) void sound_read_waveform(bSound *sound, short *stop) { AUD_SoundInfo info = AUD_getInfo(sound->playback_handle); - SoundWaveform *waveform = MEM_mallocN(sizeof(SoundWaveform), - "SoundWaveform"); + SoundWaveform *waveform = MEM_mallocN(sizeof(SoundWaveform), "SoundWaveform"); if (info.length > 0) { int length = info.length * SOUND_WAVE_SAMPLES_PER_SECOND; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 91ca21a9fbf..9ec9f105015 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -349,7 +349,11 @@ bool do_colorband(const ColorBand *coba, float in, float out[4]) CBData left, right; /* we're looking for first pos > in */ - for (a = 0; a < coba->tot; a++, cbd1++) if (cbd1->pos > in) break; + for (a = 0; a < coba->tot; a++, cbd1++) { + if (cbd1->pos > in) { + break; + } + } if (a == coba->tot) { cbd2 = cbd1 - 1; |