Cleanup: style
This commit is contained in:
parent
2689247f98
commit
ecdbe3cc63
@ -517,7 +517,7 @@ void BKE_displist_fill(ListBase *dispbase, ListBase *to, const float normal_proj
|
||||
dl = dl->next;
|
||||
}
|
||||
|
||||
/* XXX (obedit && obedit->actcol) ? (obedit->actcol-1) : 0)) { */
|
||||
/* XXX (obedit && obedit->actcol) ? (obedit->actcol - 1) : 0)) { */
|
||||
if (totvert && (tot = BLI_scanfill_calc_ex(&sf_ctx,
|
||||
scanfill_flag,
|
||||
normal_proj)))
|
||||
|
@ -771,7 +771,9 @@ int isect_seg_seg_v2_point(const float v1[2], const float v2[2], const float v3[
|
||||
|
||||
bool isect_seg_seg_v2(const float v1[2], const float v2[2], const float v3[2], const float v4[2])
|
||||
{
|
||||
#define CCW(A, B, C) ((C[1] - A[1]) * (B[0] - A[0]) > (B[1]-A[1]) * (C[0]-A[0]))
|
||||
#define CCW(A, B, C) \
|
||||
((C[1] - A[1]) * (B[0] - A[0]) > \
|
||||
(B[1] - A[1]) * (C[0] - A[0]))
|
||||
|
||||
return CCW(v1, v3, v4) != CCW(v2, v3, v4) && CCW(v1, v2, v3) != CCW(v1, v2, v4);
|
||||
|
||||
|
@ -1292,7 +1292,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
|
||||
Object *ob;
|
||||
|
||||
for (vf = main->vfont.first; vf; vf = vf->id.next) {
|
||||
if (STREQ(vf->name + strlen(vf->name)-6, ".Bfont")) {
|
||||
if (STREQ(vf->name + strlen(vf->name) - 6, ".Bfont")) {
|
||||
strcpy(vf->name, FO_BUILTIN_NAME);
|
||||
}
|
||||
}
|
||||
@ -2480,7 +2480,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
|
||||
|
||||
for (group = main->group.first; group; group = group->id.next)
|
||||
if (group->layer == 0)
|
||||
group->layer = (1<<20)-1;
|
||||
group->layer = (1 << 20) - 1;
|
||||
|
||||
/* now, subversion control! */
|
||||
if (main->subversionfile < 3) {
|
||||
|
@ -52,7 +52,7 @@ void LuminanceMatteOperation::executePixelSampled(float output[4], float x, floa
|
||||
this->m_inputImageProgram->readSampled(inColor, x, y, sampler);
|
||||
|
||||
/* one line thread-friend algorithm:
|
||||
* output[0] = max(inputValue[3], min(high, max(low, ((inColor[0]-low)/(high-low))))
|
||||
* output[0] = max(inputValue[3], min(high, max(low, ((inColor[0] - low) / (high - low))));
|
||||
*/
|
||||
|
||||
/* test range */
|
||||
|
@ -1177,7 +1177,7 @@ static void getVerticalAndHorizontalChange(const float norm[3], float d, const f
|
||||
dists[index] = dot_v3v3(norm, end) + d;
|
||||
/* vertical change */
|
||||
changes[index][0] = dists[index] - distToStart;
|
||||
//printf("vc %f %f\n", distance(end, projB, 3)-distance(start, projA, 3), changes[index][0]);
|
||||
//printf("vc %f %f\n", distance(end, projB, 3) - distance(start, projA, 3), changes[index][0]);
|
||||
/* horizontal change */
|
||||
changes[index][1] = len_v3v3(projA, projB);
|
||||
}
|
||||
|
@ -830,11 +830,11 @@ static int line_isect_y(const float p1[2], const float p2[2], const float y_leve
|
||||
}
|
||||
|
||||
if (p1[1] > y_level && p2[1] < y_level) {
|
||||
*x_isect = (p2[0] * (p1[1] - y_level) + p1[0] * (y_level - p2[1])) / y_diff; /*(p1[1]-p2[1]);*/
|
||||
*x_isect = (p2[0] * (p1[1] - y_level) + p1[0] * (y_level - p2[1])) / y_diff; /* (p1[1] - p2[1]); */
|
||||
return ISECT_TRUE;
|
||||
}
|
||||
else if (p1[1] < y_level && p2[1] > y_level) {
|
||||
*x_isect = (p2[0] * (y_level - p1[1]) + p1[0] * (p2[1] - y_level)) / y_diff; /*(p2[1]-p1[1]);*/
|
||||
*x_isect = (p2[0] * (y_level - p1[1]) + p1[0] * (p2[1] - y_level)) / y_diff; /* (p2[1] - p1[1]); */
|
||||
return ISECT_TRUE;
|
||||
}
|
||||
else {
|
||||
@ -863,11 +863,11 @@ static int line_isect_x(const float p1[2], const float p2[2], const float x_leve
|
||||
}
|
||||
|
||||
if (p1[0] > x_level && p2[0] < x_level) {
|
||||
*y_isect = (p2[1] * (p1[0] - x_level) + p1[1] * (x_level - p2[0])) / x_diff; /*(p1[0]-p2[0]);*/
|
||||
*y_isect = (p2[1] * (p1[0] - x_level) + p1[1] * (x_level - p2[0])) / x_diff; /* (p1[0] - p2[0]); */
|
||||
return ISECT_TRUE;
|
||||
}
|
||||
else if (p1[0] < x_level && p2[0] > x_level) {
|
||||
*y_isect = (p2[1] * (x_level - p1[0]) + p1[1] * (p2[0] - x_level)) / x_diff; /*(p2[0]-p1[0]);*/
|
||||
*y_isect = (p2[1] * (x_level - p1[0]) + p1[1] * (p2[0] - x_level)) / x_diff; /* (p2[0] - p1[0]); */
|
||||
return ISECT_TRUE;
|
||||
}
|
||||
else {
|
||||
|
@ -789,7 +789,7 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so
|
||||
else {
|
||||
/* pop up panel - no previous, or user didn't want search after previous */
|
||||
name[0] = '\0';
|
||||
// XXX if (sbutton(name, 0, sizeof(name)-1, "Find: ") && name[0]) {
|
||||
// XXX if (sbutton(name, 0, sizeof(name) - 1, "Find: ") && name[0]) {
|
||||
// te = outliner_find_name(soops, &soops->tree, name, flags, NULL, &prevFound);
|
||||
// }
|
||||
// else return; /* XXX RETURN! XXX */
|
||||
|
@ -984,11 +984,11 @@ static void UNUSED_FUNCTION(seq_remap_paths) (Scene *scene)
|
||||
return;
|
||||
|
||||
BLI_strncpy(from, last_seq->strip->dir, sizeof(from));
|
||||
// XXX if (0 == sbutton(from, 0, sizeof(from)-1, "From: "))
|
||||
// XXX if (0 == sbutton(from, 0, sizeof(from) - 1, "From: "))
|
||||
// return;
|
||||
|
||||
BLI_strncpy(to, from, sizeof(to));
|
||||
// XXX if (0 == sbutton(to, 0, sizeof(to)-1, "To: "))
|
||||
// XXX if (0 == sbutton(to, 0, sizeof(to) - 1, "To: "))
|
||||
// return;
|
||||
|
||||
if (STREQ(to, from))
|
||||
|
@ -5593,22 +5593,22 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
|
||||
UI_ThemeColorShadeAlpha(TH_WIRE, 0, -100);
|
||||
glEnable(GL_BLEND);
|
||||
glBegin(GL_LINES);
|
||||
for (i = 1; i < res[0]-1; ++i) {
|
||||
float f = interpf(b[0], a[0], (float)i / (float)(res[0]-1));
|
||||
for (i = 1; i < res[0] - 1; ++i) {
|
||||
float f = interpf(b[0], a[0], (float)i / (float)(res[0] - 1));
|
||||
glVertex3f(f, a[1], a[2]); glVertex3f(f, b[1], a[2]);
|
||||
glVertex3f(f, b[1], a[2]); glVertex3f(f, b[1], b[2]);
|
||||
glVertex3f(f, b[1], b[2]); glVertex3f(f, a[1], b[2]);
|
||||
glVertex3f(f, a[1], b[2]); glVertex3f(f, a[1], a[2]);
|
||||
}
|
||||
for (i = 1; i < res[1]-1; ++i) {
|
||||
float f = interpf(b[1], a[1], (float)i / (float)(res[1]-1));
|
||||
for (i = 1; i < res[1] - 1; ++i) {
|
||||
float f = interpf(b[1], a[1], (float)i / (float)(res[1] - 1));
|
||||
glVertex3f(a[0], f, a[2]); glVertex3f(b[0], f, a[2]);
|
||||
glVertex3f(b[0], f, a[2]); glVertex3f(b[0], f, b[2]);
|
||||
glVertex3f(b[0], f, b[2]); glVertex3f(a[0], f, b[2]);
|
||||
glVertex3f(a[0], f, b[2]); glVertex3f(a[0], f, a[2]);
|
||||
}
|
||||
for (i = 1; i < res[2]-1; ++i) {
|
||||
float f = interpf(b[2], a[2], (float)i / (float)(res[2]-1));
|
||||
for (i = 1; i < res[2] - 1; ++i) {
|
||||
float f = interpf(b[2], a[2], (float)i / (float)(res[2] - 1));
|
||||
glVertex3f(a[0], a[1], f); glVertex3f(b[0], a[1], f);
|
||||
glVertex3f(b[0], a[1], f); glVertex3f(b[0], b[1], f);
|
||||
glVertex3f(b[0], b[1], f); glVertex3f(a[0], b[1], f);
|
||||
|
@ -118,7 +118,7 @@ static char *gpu_str_skip_token(char *str, char *token, int max)
|
||||
if (ELEM(*str, ' ', '(', ')', ',', '\t', '\n', '\r'))
|
||||
break;
|
||||
else {
|
||||
if (token && len < max-1) {
|
||||
if (token && len < max - 1) {
|
||||
*token = *str;
|
||||
token++;
|
||||
len++;
|
||||
@ -238,7 +238,7 @@ static char *gpu_generate_function_prototyps(GHash *hash)
|
||||
BLI_dynstr_appendf(ds, " param%d", a);
|
||||
# endif
|
||||
|
||||
if (a != function->totparam-1)
|
||||
if (a != function->totparam - 1)
|
||||
BLI_dynstr_append(ds, ", ");
|
||||
}
|
||||
BLI_dynstr_append(ds, ");\n");
|
||||
|
Loading…
Reference in New Issue
Block a user