Mercurial > octave
diff libinterp/corefcn/gl-render.cc @ 23450:855122b993da
maint: Wrap tertiary operator in parentheses "(COND ? x : y)".
* Canvas.cc, color-picker.cc, dialog.cc, marker.cc, main-window.cc, Cell.cc,
__magick_read__.cc, __pchip_deriv__.cc, __qp__.cc, bsxfun.cc, call-stack.cc,
cellfun.cc, data.cc, defaults.cc, det.cc, eig.cc, error.cc, file-io.cc,
filter.cc, find.cc, gammainc.cc, gcd.cc, gl-render.cc, graphics.cc,
graphics.in.h, help.cc, hex2num.cc, inv.cc, load-save.cc, lookup.cc,
ls-mat4.cc, ls-mat5.cc, ls-oct-binary.cc, ls-oct-text.cc, lu.cc, max.cc,
mex.cc, oct-hist.cc, oct-map.cc, oct-procbuf.cc, oct-stream.cc, pr-output.cc,
rand.cc, regexp.cc, schur.cc, str2double.cc, strfns.cc, symtab.cc, sysdep.cc,
tril.cc, variables.cc, xdiv.cc, audiodevinfo.cc, audioread.cc, colamd.cc,
gzip.cc, ov-base-diag.cc, ov-base-mat.h, ov-base-scalar.h, ov-class.cc,
ov-classdef.cc, ov-fcn-handle.cc, ov-range.cc, ov-range.h, ov-struct.cc,
ov-usr-fcn.cc, ov.cc, octave.cc, op-class.cc, pt-eval.cc, pt-funcall.cc,
pt-idx.cc, pt-jit.cc, pt-stmt.cc, version.cc, Array-util.cc, Array.cc,
CDiagMatrix.cc, CMatrix.cc, CNDArray.cc, CSparse.cc, Range.cc, Sparse.cc,
chNDArray.cc, dDiagMatrix.cc, dMatrix.cc, dNDArray.cc, dSparse.cc,
dim-vector.cc, fCDiagMatrix.cc, fCMatrix.cc, fCNDArray.cc, fDiagMatrix.cc,
fMatrix.cc, fNDArray.cc, idx-vector.cc, idx-vector.h, Faddeeva.cc, DASPK.cc,
DASRT.cc, DASSL.cc, EIG.cc, fEIG.cc, gsvd.cc, lo-specfun.cc, oct-rand.cc,
qr.cc, qrp.cc, randgamma.cc, schur.cc, svd.cc, Sparse-diag-op-defs.h,
mx-inlines.cc, oct-env.cc, cmd-edit.cc, kpse.cc, oct-inttypes.h, oct-sort.cc:
Wrap tertiary operator in parentheses "(COND ? x : y)".
author | Rik <rik@octave.org> |
---|---|
date | Thu, 27 Apr 2017 17:33:10 -0700 |
parents | cd4e1ee28716 |
children | 06bf3a0b08bf |
line wrap: on
line diff
--- a/libinterp/corefcn/gl-render.cc Thu Apr 27 15:18:20 2017 -0700 +++ b/libinterp/corefcn/gl-render.cc Thu Apr 27 17:33:10 2017 -0700 @@ -1488,10 +1488,12 @@ // tick texts if (xticklabels.numel () > 0) { - int halign = (xstate == AXE_HORZ_DIR ? 1 : - (xyzSym || is_origin_low ? 0 : 2)); - int valign = (xstate == AXE_VERT_DIR ? 1 : - (x2Dtop || is_origin_low ? 0 : 2)); + int halign = (xstate == AXE_HORZ_DIR + ? 1 + : (xyzSym || is_origin_low ? 0 : 2)); + int valign = (xstate == AXE_VERT_DIR + ? 1 + : (x2Dtop || is_origin_low ? 0 : 2)); if (tick_along_z) render_ticktexts (xticks, xticklabels, x_min, x_max, @@ -1668,10 +1670,12 @@ // tick texts if (yticklabels.numel () > 0) { - int halign = (ystate == AXE_HORZ_DIR ? 1 : - (! xyzSym || y2Dright || is_origin_low ? 0 : 2)); - int valign = (ystate == AXE_VERT_DIR ? 1 : - (is_origin_low ? 0 : 2)); + int halign = (ystate == AXE_HORZ_DIR + ? 1 + : (! xyzSym || y2Dright || is_origin_low ? 0 : 2)); + int valign = (ystate == AXE_VERT_DIR + ? 1 + : (is_origin_low ? 0 : 2)); if (tick_along_z) render_ticktexts (yticks, yticklabels, y_min, y_max, @@ -2254,7 +2258,7 @@ (props.backfacelighting_is ("reverselit") ? 1 : 2)); Matrix fcolor = (fc_mode == TEXTURE ? Matrix (1, 3, 1.0) - : props.get_facecolor_rgb ()); + : props.get_facecolor_rgb ()); Matrix ecolor = props.get_edgecolor_rgb (); float as = props.get_ambientstrength (); @@ -2330,8 +2334,8 @@ if ((fl_mode > 0) && (num_lights > 0)) glEnable (GL_LIGHTING); - glShadeModel ((fc_mode == INTERP || fl_mode == GOURAUD) ? GL_SMOOTH - : GL_FLAT); + glShadeModel ((fc_mode == INTERP || fl_mode == GOURAUD) + ? GL_SMOOTH : GL_FLAT); set_polygon_offset (true, 1); if (fc_mode == TEXTURE) glEnable (GL_TEXTURE_2D); @@ -2534,8 +2538,8 @@ if ((el_mode > 0) && (num_lights > 0)) glEnable (GL_LIGHTING); - glShadeModel ((ec_mode == INTERP || el_mode == GOURAUD) ? GL_SMOOTH - : GL_FLAT); + glShadeModel ((ec_mode == INTERP || el_mode == GOURAUD) + ? GL_SMOOTH : GL_FLAT); set_linestyle (props.get_linestyle (), false, props.get_linewidth ()); @@ -2806,9 +2810,9 @@ } Matrix lc = (do_edge ? (mecolor.is_empty () ? cc : mecolor) - : Matrix ()); + : Matrix ()); Matrix fc = (do_face ? (mfcolor.is_empty () ? cc : mfcolor) - : Matrix ()); + : Matrix ()); draw_marker (x(j1,i), y(j,i1), z(j,i), lc, fc); } @@ -3279,9 +3283,9 @@ } Matrix lc = (do_edge ? (mecolor.is_empty () ? cc : mecolor) - : Matrix ()); + : Matrix ()); Matrix fc = (do_face ? (mfcolor.is_empty () ? cc : mfcolor) - : Matrix ()); + : Matrix ()); draw_marker (v(idx,0), v(idx,1), (has_z ? v(idx,2) : 0), lc, fc); }