diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-11-26 03:08:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-11-26 03:08:25 +0300 |
commit | d0b453577a84212e7dccc5bc40507bdbee65a42e (patch) | |
tree | 2724649709b179145c14060f303ed728be860e8f /source/blender | |
parent | 2d52f65c60cf7e166f6cda9186fe1e89a201f9d6 (diff) |
Cleanup: whitespace
Diffstat (limited to 'source/blender')
6 files changed, 24 insertions, 27 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index b925094d392..d8aece8c05b 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -898,8 +898,7 @@ static void cdDM_drawMappedFacesGLSL( glShadeModel(GL_SMOOTH); - if (setDrawOptions != NULL) - { + if (setDrawOptions != NULL) { DMVertexAttribs attribs; DEBUG_VBO("Using legacy code. cdDM_drawMappedFacesGLSL\n"); memset(&attribs, 0, sizeof(attribs)); diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 7ff292efd8a..23bc2470945 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2810,8 +2810,7 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm, CCG_key_top_level(&key, ss); ccgdm_pbvh_update(ccgdm); - if (setDrawOptions != NULL) - { + if (setDrawOptions != NULL) { const float (*lnors)[3] = dm->getLoopDataArray(dm, CD_NORMAL); DMVertexAttribs attribs = {{{NULL}}}; int i; diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp index deb1ebb6dc6..97ac09d4abb 100644 --- a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp +++ b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp @@ -43,22 +43,22 @@ static int extrapolate9(float *E0, float *E1, float *E2, const float *D, const float *E, const float *F, const float *G, const float *H, const float *I) { -#define PEQ(X,Y) (fabsf(*X - *Y) < 1e-3f) -#define PCPY(DST,SRC) do{*DST = *SRC;}while(0) - if ((!PEQ(B,H)) && (!PEQ(D,F))) { - if (PEQ(D,B)) PCPY(E0,D); else PCPY(E0,E); - if ((PEQ(D,B) && !PEQ(E,C)) || (PEQ(B,F) && !PEQ(E,A))) - PCPY(E1,B); else PCPY(E1,E); - if (PEQ(B,F)) PCPY(E2,F); else PCPY(E2,E); - if ((PEQ(D,B) && !PEQ(E,G)) || (PEQ(D,H) && !PEQ(E,A))) - PCPY(E3,D); else PCPY(E3,E); - PCPY(E4,E); - if ((PEQ(B,F) && !PEQ(E,I)) || (PEQ(H,F) && !PEQ(E,C))) - PCPY(E5,F); else PCPY(E5,E); - if (PEQ(D,H)) PCPY(E6,D); else PCPY(E6,E); - if ((PEQ(D,H) && !PEQ(E,I)) || (PEQ(H,F) && !PEQ(E,G))) - PCPY(E7,H); else PCPY(E7,E); - if (PEQ(H,F)) PCPY(E8,F); else PCPY(E8,E); +#define PEQ(X, Y) (fabsf(*X - *Y) < 1e-3f) +#define PCPY(DST, SRC) do { *DST = *SRC; } while (0) + if ((!PEQ(B, H)) && (!PEQ(D, F))) { + if (PEQ(D, B)) PCPY(E0, D); else PCPY(E0, E); + if ((PEQ(D, B) && !PEQ(E, C)) || (PEQ(B, F) && !PEQ(E, A))) + PCPY(E1, B); else PCPY(E1, E); + if (PEQ(B, F)) PCPY(E2, F); else PCPY(E2, E); + if ((PEQ(D, B) && !PEQ(E, G)) || (PEQ(D, H) && !PEQ(E, A))) + PCPY(E3, D); else PCPY(E3, E); + PCPY(E4, E); + if ((PEQ(B, F) && !PEQ(E, I)) || (PEQ(H, F) && !PEQ(E, C))) + PCPY(E5, F); else PCPY(E5, E); + if (PEQ(D, H)) PCPY(E6, D); else PCPY(E6, E); + if ((PEQ(D, H) && !PEQ(E, I)) || (PEQ(H, F) && !PEQ(E, G))) + PCPY(E7, H); else PCPY(E7, E); + if (PEQ(H, F)) PCPY(E8, F); else PCPY(E8, E); return 1; } else { @@ -113,9 +113,9 @@ void AntiAliasOperation::executePixel(float output[4], /* Some rounding magic to so make weighting correct with the * original coefficients. */ - unsigned char result = ((3*ninepix[0] + 5*ninepix[1] + 3*ninepix[2] + - 5*ninepix[3] + 6*ninepix[4] + 5*ninepix[5] + - 3*ninepix[6] + 5*ninepix[7] + 3*ninepix[8]) * 255.0f + + unsigned char result = ((3 * ninepix[0] + 5 * ninepix[1] + 3 * ninepix[2] + + 5 * ninepix[3] + 6 * ninepix[4] + 5 * ninepix[5] + + 3 * ninepix[6] + 5 * ninepix[7] + 3 * ninepix[8]) * 255.0f + 19.0f) / 38.0f; output[0] = result / 255.0f; } diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 1a12ec3e6bc..1ca0cab30ae 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -534,8 +534,7 @@ static bool sculpt_get_brush_geometry( mouse[0] = x; mouse[1] = y; - if (vc->obact->sculpt && vc->obact->sculpt->pbvh) - { + if (vc->obact->sculpt && vc->obact->sculpt->pbvh) { if (!ups->stroke_active) { hit = sculpt_stroke_get_location(C, location, mouse); } diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 3b01305110c..d2b8f501576 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -1315,7 +1315,7 @@ void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, bool consecutive) * The values hare are a little confusing: * * \param step: Used as the value to increase/decrease when clicking on number buttons, - * \as well as scaling mouse input for click-dragging number buttons. + * as well as scaling mouse input for click-dragging number buttons. * For floats this is (step * UI_PRECISION_FLOAT_SCALE), why? - nobody knows. * For ints, whole values are used. * diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index b57aee566b4..29a5e2d2d75 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -117,7 +117,7 @@ static void vert2geom_task_cb(void *userdata, void *userdata_chunk, int iter) /* Compute and store result. If invalid (-1 idx), keep FLT_MAX dist. */ BLI_bvhtree_find_nearest(data->treeData[i]->tree, tmp_co, &nearest, - data->treeData[i]->nearest_callback, data->treeData[i]); + data->treeData[i]->nearest_callback, data->treeData[i]); data->dist[i][iter] = sqrtf(nearest.dist_sq); if (nearest.index != -1) { |