Mercurial > octave
diff libinterp/corefcn/det.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 | 092078913d54 |
children | 80c42f4cca13 |
line wrap: on
line diff
--- a/libinterp/corefcn/det.cc Thu Apr 27 15:18:20 2017 -0700 +++ b/libinterp/corefcn/det.cc Thu Apr 27 17:33:10 2017 -0700 @@ -137,9 +137,9 @@ FloatMatrix m = arg.float_matrix_value (); MAYBE_CAST (rep, octave_float_matrix); - MatrixType mtype = rep ? rep -> matrix_type () : MatrixType (); + MatrixType mtype = (rep ? rep -> matrix_type () : MatrixType ()); FloatDET det = m.determinant (mtype, info, rcond); - retval(0) = info == -1 ? 0.0f : det.value (); + retval(0) = (info == -1 ? 0.0f : det.value ()); retval(1) = rcond; if (rep) rep->matrix_type (mtype); @@ -152,9 +152,9 @@ FloatComplexMatrix m = arg.float_complex_matrix_value (); MAYBE_CAST (rep, octave_float_complex_matrix); - MatrixType mtype = rep ? rep -> matrix_type () : MatrixType (); + MatrixType mtype = (rep ? rep -> matrix_type () : MatrixType ()); FloatComplexDET det = m.determinant (mtype, info, rcond); - retval(0) = info == -1 ? FloatComplex (0.0) : det.value (); + retval(0) = (info == -1 ? FloatComplex (0.0) : det.value ()); retval(1) = rcond; if (rep) rep->matrix_type (mtype); @@ -172,7 +172,7 @@ SparseMatrix m = arg.sparse_matrix_value (); DET det = m.determinant (info, rcond); - retval(0) = info == -1 ? 0.0 : det.value (); + retval(0) = (info == -1 ? 0.0 : det.value ()); retval(1) = rcond; } else @@ -180,10 +180,10 @@ Matrix m = arg.matrix_value (); MAYBE_CAST (rep, octave_matrix); - MatrixType mtype = rep ? rep -> matrix_type () - : MatrixType (); + MatrixType mtype = (rep ? rep -> matrix_type () + : MatrixType ()); DET det = m.determinant (mtype, info, rcond); - retval(0) = info == -1 ? 0.0 : det.value (); + retval(0) = (info == -1 ? 0.0 : det.value ()); retval(1) = rcond; if (rep) rep->matrix_type (mtype); @@ -199,7 +199,7 @@ SparseComplexMatrix m = arg.sparse_complex_matrix_value (); ComplexDET det = m.determinant (info, rcond); - retval(0) = info == -1 ? Complex (0.0) : det.value (); + retval(0) = (info == -1 ? Complex (0.0) : det.value ()); retval(1) = rcond; } else @@ -207,10 +207,10 @@ ComplexMatrix m = arg.complex_matrix_value (); MAYBE_CAST (rep, octave_complex_matrix); - MatrixType mtype = rep ? rep -> matrix_type () - : MatrixType (); + MatrixType mtype = (rep ? rep -> matrix_type () + : MatrixType ()); ComplexDET det = m.determinant (mtype, info, rcond); - retval(0) = info == -1 ? Complex (0.0) : det.value (); + retval(0) = (info == -1 ? Complex (0.0) : det.value ()); retval(1) = rcond; if (rep) rep->matrix_type (mtype);