diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-09 07:46:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-09 07:46:30 +0400 |
commit | ddddb7bab173b040342ef99270ee71ae076d45e8 (patch) | |
tree | 1d2f91c15982ff3ce1d4431d9a96b1277e50d84d /source/blender/blenkernel/intern/dynamicpaint.c | |
parent | 9e1ead1940f084c24b3751a1a52e40f40c3c4df1 (diff) |
code cleanup: favor braces when blocks have mixed brace use.
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index a01b08a3c63..4b05f1c1050 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -473,7 +473,9 @@ static float mixColors(float a_color[3], float a_weight, float b_color[3], float } weight_ratio = b_weight / (a_weight + b_weight); } - else return a_weight * (1.0f - ratio); + else { + return a_weight * (1.0f - ratio); + } /* calculate final interpolation factor */ if (ratio <= 0.5f) { @@ -2606,7 +2608,9 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface) if (!f_data->uv_p || !f_data->barycentricWeights) error = 1; } - else error = 1; + else { + error = 1; + } sData->total_points = active_points; @@ -2859,7 +2863,9 @@ static void dynamicPaint_doMaterialTex(BrushMaterials *bMats, float color[3], fl mat = bMats->ob_mats[mat_nr]; if (mat == NULL) return; /* No material assigned */ } - else return; + else { + return; + } } RE_sample_material_color(mat, color, alpha, volume_co, surface_co, faceIndex, isQuad, orcoDm, brushOb); @@ -3924,7 +3930,9 @@ static int dynamicPaint_paintSinglePoint(DynamicPaintSurface *surface, float *po strength = 1.0f - distance / brush_radius; CLAMP(strength, 0.0f, 1.0f); } - else strength = 1.0f; + else { + strength = 1.0f; + } if (strength >= 0.001f) { float paintColor[3] = {0.0f}; |