Cleanup: quiet -Wcomma warnings with clang

This commit is contained in:
Campbell Barton 2023-01-05 17:02:43 +11:00
parent 7690872ce4
commit 77c3e0895d
5 changed files with 38 additions and 14 deletions

View File

@ -497,7 +497,8 @@ static bool get_closest_vertex_to_point_in_nurbs(const ViewContext *vc,
int handle_display = vc->v3d->overlay.handle_display;
if (handle_display == CURVE_HANDLE_NONE ||
(handle_display == CURVE_HANDLE_SELECTED && !BEZT_ISSEL_ANY(bezt))) {
start = 1, end = 2;
start = 1;
end = 2;
}
/* Loop over each of the 3 points of the #BezTriple and update data of closest bezt. */
@ -1169,7 +1170,8 @@ static void move_segment(ViewContext *vc, MoveSegmentData *seg_data, const wmEve
BezTriple *temp_bezt = bezt2;
bezt2 = bezt1;
bezt1 = temp_bezt;
h1 = 0, h2 = 2;
h1 = 0;
h2 = 2;
}
const float t = max_ff(min_ff(seg_data->t, 0.9f), 0.1f);

View File

@ -135,7 +135,8 @@ static uiTooltipField *text_field_add(uiTooltipData *data,
uiTooltipField *field = text_field_add_only(data);
field->format = {};
field->format.style = style;
field->format.color_id = color, field->format.is_pad = is_pad;
field->format.color_id = color;
field->format.is_pad = is_pad;
return field;
}

View File

@ -202,13 +202,18 @@ static void recalcData_sequencer_image(TransInfo *t)
/* Origin. */
float origin[2];
copy_v2_v2(origin, td2d->loc);
i++, td++, td2d++;
i++;
td++;
td2d++;
/* X and Y control points used to read scale and rotation. */
float handle_x[2];
copy_v2_v2(handle_x, td2d->loc);
sub_v2_v2(handle_x, origin);
i++, td++, td2d++;
i++;
td++;
td2d++;
float handle_y[2];
copy_v2_v2(handle_y, td2d->loc);
sub_v2_v2(handle_y, origin);

View File

@ -603,9 +603,15 @@ static void lineart_shadow_edge_cut(LineartData *ld,
for (seg = cut_start_after; seg != cut_end_before; seg = nes) {
nes = seg->next;
s1_fb_co_1 = seg->fbc2, s1_fb_co_2 = nes->fbc1;
s1_gloc_1 = seg->g2, s1_gloc_2 = nes->g1;
seg_1 = seg, seg_2 = nes;
s1_fb_co_1 = seg->fbc2;
s1_fb_co_2 = nes->fbc1;
s1_gloc_1 = seg->g2;
s1_gloc_2 = nes->g1;
seg_1 = seg;
seg_2 = nes;
if (seg == cut_start_after) {
lineart_shadow_segment_slice_get(seg->fbc2,
nes->fbc1,
@ -616,7 +622,9 @@ static void lineart_shadow_edge_cut(LineartData *ld,
nes->ratio,
m_fbc1,
m_g1);
s1_fb_co_1 = m_fbc1, s1_gloc_1 = m_g1;
s1_fb_co_1 = m_fbc1;
s1_gloc_1 = m_g1;
seg_1 = new_seg_1;
if (cut_start_after != new_seg_1) {
BLI_insertlinkafter(&e->shadow_segments, cut_start_after, new_seg_1);
@ -634,7 +642,9 @@ static void lineart_shadow_edge_cut(LineartData *ld,
nes->ratio,
m_fbc2,
m_g2);
s1_fb_co_2 = m_fbc2, s1_gloc_2 = m_g2;
s1_fb_co_2 = m_fbc2;
s1_gloc_2 = m_g2;
seg_2 = new_seg_2;
if (cut_end_before != new_seg_2) {
BLI_insertlinkbefore(&e->shadow_segments, cut_end_before, new_seg_2);
@ -821,13 +831,15 @@ static bool lineart_shadow_cast_onto_triangle(LineartData *ld,
interp_v3_v3v3_db(t_gpos1, gpos1, gpos2, gat1);
interp_v3_v3v3_db(t_fbc1, fbc1, fbc2, rat1);
t_fbc1[3] = interpd(fbc2[3], fbc1[3], gat1);
at1 = 0, trimmed1 = true;
at1 = 0;
trimmed1 = true;
}
if (at2 > 1) {
interp_v3_v3v3_db(t_gpos2, gpos1, gpos2, gat2);
interp_v3_v3v3_db(t_fbc2, fbc1, fbc2, rat2);
t_fbc2[3] = interpd(fbc2[3], fbc1[3], gat2);
at2 = 1, trimmed2 = true;
at2 = 1;
trimmed2 = true;
}
}
if (trimmed1) {

View File

@ -235,11 +235,15 @@ static void wm_xr_controller_model_draw(const XrSessionSettings *settings,
switch (settings->controller_draw_style) {
case XR_CONTROLLER_DRAW_DARK:
case XR_CONTROLLER_DRAW_DARK_RAY:
color[0] = color[1] = color[2] = 0.0f, color[3] = 0.4f;
color[0] = color[1] = color[2] = 0.0f;
color[3] = 0.4f;
break;
case XR_CONTROLLER_DRAW_LIGHT:
case XR_CONTROLLER_DRAW_LIGHT_RAY:
color[0] = 0.422f, color[1] = 0.438f, color[2] = 0.446f, color[3] = 0.4f;
color[0] = 0.422f;
color[1] = 0.438f;
color[2] = 0.446f;
color[3] = 0.4f;
break;
}