Cleanup: whitespace

This commit is contained in:
2015-11-26 11:08:25 +11:00
parent 2d52f65c60
commit d0b453577a
6 changed files with 24 additions and 27 deletions

View File

@@ -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));

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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);
}

View File

@@ -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.
*

View File

@@ -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) {