Mercurial > octave
diff libinterp/corefcn/graphics.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 | c763214a8260 |
children | 0af6dbede266 |
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc Thu Apr 27 15:18:20 2017 -0700 +++ b/libinterp/corefcn/graphics.cc Thu Apr 27 17:33:10 2017 -0700 @@ -1829,8 +1829,8 @@ } else if (type.compare ("handle")) { - double hv = args.length () > 0 ? args(0).double_value () - : octave::numeric_limits<double>::NaN (); + double hv = (args.length () > 0 ? args(0).double_value () + : octave::numeric_limits<double>::NaN ()); graphics_handle gh (hv); @@ -5565,7 +5565,7 @@ // does not seem to be required. Need investigation with concrete // graphics toolkit to see results visually. if (false && dowarp) - af = 1.0 / (xM > yM ? xM : yM); + af = (1.0 / (xM > yM ? xM : yM)); else { if ((bb(2)/bb(3)) > (xM/yM)) @@ -5754,7 +5754,7 @@ xySym = (xd*yd*(xPlane-xPlaneN)*(yPlane-yPlaneN) > 0); zSign = (zd*(zPlane-zPlaneN) <= 0); - xyzSym = zSign ? xySym : ! xySym; + xyzSym = (zSign ? xySym : ! xySym); xpTick = (zSign ? xPlaneN : xPlane); ypTick = (zSign ? yPlaneN : yPlane); zpTick = (zSign ? zPlane : zPlaneN); @@ -6477,8 +6477,8 @@ axes::properties::get_boundingbox (bool internal, const Matrix& parent_pix_size) const { - Matrix pos = internal ? get_position ().matrix_value () - : get_outerposition ().matrix_value (); + Matrix pos = (internal ? get_position ().matrix_value () + : get_outerposition ().matrix_value ()); Matrix parent_size (parent_pix_size); if (parent_size.is_empty ()) @@ -7177,7 +7177,7 @@ if (n_ticks < 2) return; - int n = is_logscale ? 8 : 4; + int n = (is_logscale ? 8 : 4); Matrix tmp_mticks (1, n * (n_ticks - 1)); for (int i = 0; i < n_ticks-1; i++) @@ -8194,7 +8194,7 @@ void axes::properties::clear_zoom_stack (bool do_unzoom) { - size_t items_to_leave_on_stack = do_unzoom ? 7 : 0; + size_t items_to_leave_on_stack = (do_unzoom ? 7 : 0); while (zoom_stack.size () > items_to_leave_on_stack) zoom_stack.pop_front ();