# HG changeset patch # User Markus Mützel # Date 1700930136 -3600 # Node ID b962f1d4ad1b3a8e26b404769c0a1805aa61aaa4 # Parent 14f76908db23c02c6587b2da92c7fa479c4a1acc# Parent 1de97b475564e284d21ac666b2744e2cf868c526 maint: Merge stable to default. diff -r 14f76908db23 -r b962f1d4ad1b libinterp/corefcn/__pchip_deriv__.cc --- a/libinterp/corefcn/__pchip_deriv__.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/corefcn/__pchip_deriv__.cc Sat Nov 25 17:35:36 2023 +0100 @@ -81,8 +81,8 @@ for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) { F77_XFCN (pchim, PCHIM, (nx, xvec.data (), - reinterpret_cast(ymat.data ()) + k * inc, - reinterpret_cast(dmat.fortran_vec ()) + k * inc, + reinterpret_cast (ymat.data ()) + k * inc, + reinterpret_cast (dmat.fortran_vec ()) + k * inc, incfd, ierr)); if (ierr < 0) @@ -90,8 +90,8 @@ OCTAVE_F77_INT_TYPE_FORMAT, ierr); F77_XFCN (pchim, PCHIM, (nx, xvec.data (), - reinterpret_cast(ymat.data ()) + 1 + k * inc, - reinterpret_cast(dmat.fortran_vec ()) + 1 + k * inc, + reinterpret_cast (ymat.data ()) + 1 + k * inc, + reinterpret_cast (dmat.fortran_vec ()) + 1 + k * inc, incfd, ierr)); if (ierr < 0) @@ -164,8 +164,8 @@ for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) { F77_XFCN (dpchim, DPCHIM, (nx, xvec.data (), - reinterpret_cast(ymat.data ()) + k * inc, - reinterpret_cast(dmat.fortran_vec ()) + k * inc, + reinterpret_cast (ymat.data ()) + k * inc, + reinterpret_cast (dmat.fortran_vec ()) + k * inc, incfd, ierr)); if (ierr < 0) @@ -173,8 +173,8 @@ OCTAVE_F77_INT_TYPE_FORMAT, ierr); F77_XFCN (dpchim, DPCHIM, (nx, xvec.data (), - reinterpret_cast(ymat.data ()) + 1 + k * inc, - reinterpret_cast(dmat.fortran_vec ()) + 1 + k * inc, + reinterpret_cast (ymat.data ()) + 1 + k * inc, + reinterpret_cast (dmat.fortran_vec ()) + 1 + k * inc, incfd, ierr)); if (ierr < 0) diff -r 14f76908db23 -r b962f1d4ad1b libinterp/corefcn/ccolamd.cc --- a/libinterp/corefcn/ccolamd.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/corefcn/ccolamd.cc Sat Nov 25 17:35:36 2023 +0100 @@ -277,7 +277,7 @@ OCTAVE_LOCAL_BUFFER (suitesparse_integer, cmember, cslen); for (octave_idx_type i = 0; i < cslen; i++) // convert cmember from 1-based to 0-based - cmember[i] = static_cast(in_cmember(i) - 1); + cmember[i] = static_cast (in_cmember(i) - 1); if (cslen != n_col) error ("ccolamd: CMEMBER must be of length equal to #cols of A"); diff -r 14f76908db23 -r b962f1d4ad1b libinterp/corefcn/data.cc --- a/libinterp/corefcn/data.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/corefcn/data.cc Sat Nov 25 17:35:36 2023 +0100 @@ -447,8 +447,8 @@ void map_2_xlog2 (const Array& x, Array& f, Array& e) { - f = Array(x.dims ()); - e = Array(x.dims ()); + f = Array (x.dims ()); + e = Array (x.dims ()); for (octave_idx_type i = 0; i < x.numel (); i++) { int exp; diff -r 14f76908db23 -r b962f1d4ad1b libinterp/corefcn/gzfstream.h --- a/libinterp/corefcn/gzfstream.h Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/corefcn/gzfstream.h Sat Nov 25 17:35:36 2023 +0100 @@ -303,7 +303,7 @@ */ gzfilebuf * rdbuf () const - { return const_cast(&m_sb); } + { return const_cast (&m_sb); } /** * @brief Check if file is open. @@ -390,7 +390,7 @@ */ gzfilebuf * rdbuf () const - { return const_cast(&m_sb); } + { return const_cast (&m_sb); } /** * @brief Check if file is open. @@ -493,12 +493,12 @@ template inline gzofstream& operator<<(gzofstream& s, const gzomanip2& m) -{ return (*m.m_fcn)(s, m.m_val1, m.m_val2); } +{ return (*m.m_fcn) (s, m.m_val1, m.m_val2); } // Insert this onto stream to simplify setting of compression level inline gzomanip2 setcompression (int l, int s = Z_DEFAULT_STRATEGY) -{ return gzomanip2(&setcompression, l, s); } +{ return gzomanip2 (&setcompression, l, s); } #endif diff -r 14f76908db23 -r b962f1d4ad1b libinterp/corefcn/stack-frame.cc --- a/libinterp/corefcn/stack-frame.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/corefcn/stack-frame.cc Sat Nov 25 17:35:36 2023 +0100 @@ -338,7 +338,7 @@ void resize (std::size_t arg) { - int diff = static_cast (arg) - static_cast(size ()); + int diff = static_cast (arg) - static_cast (size ()); if (diff > 0) internal_resize (internal_size () + diff); @@ -360,7 +360,7 @@ // Not ok to resize for scripts. Extra slots should be in the eval frame. CHECK_PANIC (!m_fcn->is_user_script ()); - int diff = static_cast (arg) - static_cast(internal_size ()); + int diff = static_cast (arg) - static_cast (internal_size ()); if (diff > 0) { diff -r 14f76908db23 -r b962f1d4ad1b libinterp/corefcn/strfind.cc --- a/libinterp/corefcn/strfind.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/corefcn/strfind.cc Sat Nov 25 17:35:36 2023 +0100 @@ -47,7 +47,7 @@ // This allows safe indexing with char. // In C++, char may be (and often is) signed! -#define ORD(ch) static_cast(ch) +#define ORD(ch) static_cast (ch) #define TABSIZE (std::numeric_limits::max () + 1) // This is the quick search algorithm, as described at diff -r 14f76908db23 -r b962f1d4ad1b libinterp/corefcn/urlwrite.cc --- a/libinterp/corefcn/urlwrite.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/corefcn/urlwrite.cc Sat Nov 25 17:35:36 2023 +0100 @@ -304,7 +304,7 @@ if (keys(i) == "Timeout") { float timeout = object.get (keys(i)).float_value (); - options.Timeout = static_cast(timeout * 1000); + options.Timeout = static_cast (timeout * 1000); } if (keys(i) == "HeaderFields") diff -r 14f76908db23 -r b962f1d4ad1b libinterp/corefcn/xpow.cc --- a/libinterp/corefcn/xpow.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/corefcn/xpow.cc Sat Nov 25 17:35:36 2023 +0100 @@ -84,7 +84,7 @@ xisint (float x) { static const float out_of_range_top - = static_cast(std::numeric_limits::max ()) + 1.; + = static_cast (std::numeric_limits::max ()) + 1.; return (octave::math::x_nint (x) == x && x < out_of_range_top && x >= std::numeric_limits::min ()); diff -r 14f76908db23 -r b962f1d4ad1b libinterp/dldfcn/__init_fltk__.cc --- a/libinterp/dldfcn/__init_fltk__.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/dldfcn/__init_fltk__.cc Sat Nov 25 17:35:36 2023 +0100 @@ -1139,7 +1139,7 @@ && m_ax_obj.get_properties ().get_tag () != "colorbar") { axes::properties& ap - = dynamic_cast(m_ax_obj.get_properties ()); + = dynamic_cast (m_ax_obj.get_properties ()); ap.set (name, value); } else // no axes object clicked so far, take currentaxes @@ -1152,7 +1152,7 @@ graphics_object go = gh_mgr.get_object (gh); axes::properties& ap - = dynamic_cast(go.get_properties ()); + = dynamic_cast (go.get_properties ()); ap.set (name, value); } diff -r 14f76908db23 -r b962f1d4ad1b libinterp/octave-value/ov-base-scalar.cc --- a/libinterp/octave-value/ov-base-scalar.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/octave-value/ov-base-scalar.cc Sat Nov 25 17:35:36 2023 +0100 @@ -233,7 +233,7 @@ // Don't use builtin_type () here to avoid an extra VM call. if (btyp == class_to_btyp::btyp) { - *(reinterpret_cast(where)) = scalar; + *(reinterpret_cast (where)) = scalar; return true; } else diff -r 14f76908db23 -r b962f1d4ad1b libinterp/octave-value/ov-base.cc --- a/libinterp/octave-value/ov-base.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/octave-value/ov-base.cc Sat Nov 25 17:35:36 2023 +0100 @@ -547,7 +547,7 @@ } \ \ static const double out_of_range_top \ - = static_cast(std::numeric_limits::max ()) + 1.; \ + = static_cast (std::numeric_limits::max ()) + 1.; \ if (require_int && octave::math::x_nint (d) != d) \ error_with_cfn ("conversion of %g to " #T " value failed", d); \ else if (d < std::numeric_limits::min ()) \ diff -r 14f76908db23 -r b962f1d4ad1b libinterp/octave-value/ov-float.cc --- a/libinterp/octave-value/ov-float.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/octave-value/ov-float.cc Sat Nov 25 17:35:36 2023 +0100 @@ -442,12 +442,12 @@ // Support inline real->complex conversion. if (btyp == btyp_float) { - *(reinterpret_cast(where)) = scalar; + *(reinterpret_cast (where)) = scalar; return true; } else if (btyp == btyp_float_complex) { - *(reinterpret_cast(where)) = scalar; + *(reinterpret_cast (where)) = scalar; return true; } else diff -r 14f76908db23 -r b962f1d4ad1b libinterp/octave-value/ov-scalar.cc --- a/libinterp/octave-value/ov-scalar.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/octave-value/ov-scalar.cc Sat Nov 25 17:35:36 2023 +0100 @@ -469,12 +469,12 @@ // Support inline real->complex conversion. if (btyp == btyp_double) { - *(reinterpret_cast(where)) = scalar; + *(reinterpret_cast (where)) = scalar; return true; } else if (btyp == btyp_complex) { - *(reinterpret_cast(where)) = scalar; + *(reinterpret_cast (where)) = scalar; return true; } else diff -r 14f76908db23 -r b962f1d4ad1b libinterp/octave-value/ov-struct.cc --- a/libinterp/octave-value/ov-struct.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/octave-value/ov-struct.cc Sat Nov 25 17:35:36 2023 +0100 @@ -1111,7 +1111,7 @@ // To avoid copying the scalar struct, it just stores a pointer to // itself. const octave_scalar_map *sm_ptr; - void *here = reinterpret_cast(&sm_ptr); + void *here = reinterpret_cast (&sm_ptr); return (x.get_rep ().fast_elem_insert_self (here, btyp_struct) && m_map.fast_elem_insert (n, *sm_ptr)); } @@ -1779,7 +1779,7 @@ if (btyp == btyp_struct) { - *(reinterpret_cast(where)) = &m_map; + *(reinterpret_cast (where)) = &m_map; return true; } else diff -r 14f76908db23 -r b962f1d4ad1b libinterp/parse-tree/pt-bytecode-vm-internal.h --- a/libinterp/parse-tree/pt-bytecode-vm-internal.h Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/parse-tree/pt-bytecode-vm-internal.h Sat Nov 25 17:35:36 2023 +0100 @@ -261,7 +261,7 @@ #define CATCH_INTERRUPT_EXCEPTION \ catch (interrupt_exception& e) \ { \ - (*sp++).i = static_cast(error_type::INTERRUPT_EXC); \ + (*sp++).i = static_cast (error_type::INTERRUPT_EXC); \ goto unwind; \ } \ diff -r 14f76908db23 -r b962f1d4ad1b libinterp/parse-tree/pt-bytecode-vm.cc --- a/libinterp/parse-tree/pt-bytecode-vm.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/libinterp/parse-tree/pt-bytecode-vm.cc Sat Nov 25 17:35:36 2023 +0100 @@ -1137,8 +1137,8 @@ // Read the meta data for constructing a stack frame. { -#define N_RETURNS() static_cast(code[0]) -#define N_ARGS() static_cast(code[1]) +#define N_RETURNS() static_cast (code[0]) +#define N_ARGS() static_cast (code[1]) #define N_LOCALS() USHORT_FROM_UCHAR_PTR (code + 2) int n_returns = static_cast (*ip++); @@ -1340,7 +1340,7 @@ if (vararg_defined && !ov_vararg.iscell ()) { (*sp++).pee = new execution_exception {"error","","varargout must be a cell array object"}; - (*sp++).i = static_cast(error_type::EXECUTION_EXC); + (*sp++).i = static_cast (error_type::EXECUTION_EXC); goto unwind; } if (vararg_defined) @@ -1560,7 +1560,7 @@ if (lst.empty ()) { // TODO: Need id, name - (*sp++).i = static_cast(error_type::INVALID_N_EL_RHS_IN_ASSIGNMENT); + (*sp++).i = static_cast (error_type::INVALID_N_EL_RHS_IN_ASSIGNMENT); goto unwind; } @@ -1570,7 +1570,7 @@ if (ov_rhs.is_undefined ()) { // TODO: Need id, name - (*sp++).i = static_cast(error_type::RHS_UNDEF_IN_ASSIGNMENT); + (*sp++).i = static_cast (error_type::RHS_UNDEF_IN_ASSIGNMENT); goto unwind; } @@ -1652,7 +1652,7 @@ } else { - (*sp++).i = static_cast(error_type::IF_UNDEFINED); + (*sp++).i = static_cast (error_type::IF_UNDEFINED); goto unwind; } @@ -2015,7 +2015,7 @@ if (! ov.is_defined ()) { (*sp++).ps = new std::string {name_data[slot]}; - (*sp++).i = static_cast(error_type::ID_UNDEFINED); + (*sp++).i = static_cast (error_type::ID_UNDEFINED); goto unwind; } @@ -2528,7 +2528,7 @@ if (! fcn) { (*sp++).ps = new std::string {name_data[slot]}; - (*sp++).i = static_cast(error_type::ID_UNDEFINED); + (*sp++).i = static_cast (error_type::ID_UNDEFINED); goto unwind; } else if (fcn->is_compiled ()) @@ -3593,7 +3593,7 @@ { // TODO: Need id, name // TODO: Make execution_exception like the others instead of its own error_type - (*sp++).i = static_cast(error_type::INVALID_N_EL_RHS_IN_ASSIGNMENT); + (*sp++).i = static_cast (error_type::INVALID_N_EL_RHS_IN_ASSIGNMENT); goto unwind; } @@ -3639,7 +3639,7 @@ if (ov.is_undefined ()) { (*sp++).pee = new execution_exception {"error","","invalid use of 'end': may only be used to index existing value"}; - (*sp++).i = static_cast(error_type::EXECUTION_EXC); + (*sp++).i = static_cast (error_type::EXECUTION_EXC); goto unwind; } @@ -3681,7 +3681,7 @@ if (ov.is_undefined ()) { (*sp++).pee = new execution_exception {"error","","invalid use of 'end': may only be used to index existing value"}; - (*sp++).i = static_cast(error_type::EXECUTION_EXC); + (*sp++).i = static_cast (error_type::EXECUTION_EXC); goto unwind; } @@ -3749,7 +3749,7 @@ if (is_undef && i + 1 == n_ids) { (*sp++).pee = new execution_exception {"error","","invalid use of 'end': may only be used to index existing value"}; - (*sp++).i = static_cast(error_type::EXECUTION_EXC); + (*sp++).i = static_cast (error_type::EXECUTION_EXC); goto unwind; } else if (is_undef) @@ -4185,7 +4185,7 @@ if (! fcn) { (*sp++).ps = new std::string {name_data[slot]}; - (*sp++).i = static_cast(error_type::ID_UNDEFINED); + (*sp++).i = static_cast (error_type::ID_UNDEFINED); goto unwind; } @@ -4613,7 +4613,7 @@ if (! fcn) { (*sp++).ps = new std::string {name_data[slot]}; - (*sp++).i = static_cast(error_type::ID_UNDEFINED); + (*sp++).i = static_cast (error_type::ID_UNDEFINED); goto unwind; } @@ -5070,7 +5070,7 @@ { (*sp++).pee = new execution_exception {"error", "", "can't make persistent variable '" + name + "' global"}; - (*sp++).i = static_cast(error_type::EXECUTION_EXC); + (*sp++).i = static_cast (error_type::EXECUTION_EXC); goto unwind; } @@ -5103,7 +5103,7 @@ { (*sp++).pee = new execution_exception {"error", "", "can't make global variable '" + name + "' persistent"}; - (*sp++).i = static_cast(error_type::EXECUTION_EXC); + (*sp++).i = static_cast (error_type::EXECUTION_EXC); goto unwind; } @@ -5172,7 +5172,7 @@ { (*sp++).pee = new execution_exception {"error", "", "in computed assignment A OP= X, A must be defined first"}; - (*sp++).i = static_cast(error_type::EXECUTION_EXC); + (*sp++).i = static_cast (error_type::EXECUTION_EXC); goto unwind; } @@ -5348,7 +5348,7 @@ // Are we unwinding an interrupt exception? if (m_unwinding_interrupt) { - (*sp++).i = static_cast(error_type::INTERRUPT_EXC); + (*sp++).i = static_cast (error_type::INTERRUPT_EXC); goto unwind; } @@ -5435,7 +5435,7 @@ if (! fcn) { (*sp++).ps = new std::string {name_data[slot]}; - (*sp++).i = static_cast(error_type::ID_UNDEFINED); + (*sp++).i = static_cast (error_type::ID_UNDEFINED); goto unwind; } @@ -5780,7 +5780,7 @@ if (!has_slot) { (*sp++).ps = new std::string {"temporary object"}; - (*sp++).i = static_cast(error_type::ID_UNDEFINED); + (*sp++).i = static_cast (error_type::ID_UNDEFINED); goto unwind; } @@ -5819,7 +5819,7 @@ (*sp++).ps = new std::string {name_data[slot]}; else (*sp++).ps = new std::string {"temporary object"}; - (*sp++).i = static_cast(error_type::ID_UNDEFINED); + (*sp++).i = static_cast (error_type::ID_UNDEFINED); goto unwind; } diff -r 14f76908db23 -r b962f1d4ad1b liboctave/array/CSparse.cc --- a/liboctave/array/CSparse.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/liboctave/array/CSparse.cc Sat Nov 25 17:35:36 2023 +0100 @@ -5795,7 +5795,7 @@ { octave_idx_type jr = j * b.rows (); for (octave_idx_type i = 0; i < b.rows (); i++) - retval.xelem (i, j) = static_cast(X->x)[jr + i]; + retval.xelem (i, j) = static_cast (X->x)[jr + i]; } CHOLMOD_NAME(free_dense) (&X, cm); @@ -6046,13 +6046,13 @@ (X, cm))); for (octave_idx_type j = 0; j <= static_cast (X->ncol); j++) - retval.xcidx (j) = static_cast(X->p)[j]; + retval.xcidx (j) = static_cast (X->p)[j]; for (octave_idx_type j = 0; j < octave::from_suitesparse_long (CHOLMOD_NAME(nnz) (X, cm)); j++) { - retval.xridx (j) = static_cast(X->i)[j]; - retval.xdata (j) = static_cast(X->x)[j]; + retval.xridx (j) = static_cast (X->i)[j]; + retval.xdata (j) = static_cast (X->x)[j]; } CHOLMOD_NAME(free_sparse) (&X, cm); @@ -6326,7 +6326,7 @@ { octave_idx_type jr = j * b.rows (); for (octave_idx_type i = 0; i < b.rows (); i++) - retval.xelem (i, j) = static_cast(X->x)[jr + i]; + retval.xelem (i, j) = static_cast (X->x)[jr + i]; } CHOLMOD_NAME(free_dense) (&X, cm); @@ -6556,13 +6556,13 @@ (X, cm))); for (octave_idx_type j = 0; j <= static_cast (X->ncol); j++) - retval.xcidx (j) = static_cast(X->p)[j]; + retval.xcidx (j) = static_cast (X->p)[j]; for (octave_idx_type j = 0; j < octave::from_suitesparse_long (CHOLMOD_NAME(nnz) (X, cm)); j++) { - retval.xridx (j) = static_cast(X->i)[j]; - retval.xdata (j) = static_cast(X->x)[j]; + retval.xridx (j) = static_cast (X->i)[j]; + retval.xdata (j) = static_cast (X->x)[j]; } CHOLMOD_NAME(free_sparse) (&X, cm); diff -r 14f76908db23 -r b962f1d4ad1b liboctave/array/MSparse.h --- a/liboctave/array/MSparse.h Sat Nov 25 16:51:49 2023 +0100 +++ b/liboctave/array/MSparse.h Sat Nov 25 17:35:36 2023 +0100 @@ -70,7 +70,7 @@ explicit MSparse (octave_idx_type r, octave_idx_type c, T val) : Sparse (r, c, val) { } - explicit MSparse (const PermMatrix& a) : Sparse(a) { } + explicit MSparse (const PermMatrix& a) : Sparse (a) { } MSparse (octave_idx_type r, octave_idx_type c, octave_idx_type num_nz) : Sparse (r, c, num_nz) { } diff -r 14f76908db23 -r b962f1d4ad1b liboctave/array/Sparse.cc --- a/liboctave/array/Sparse.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/liboctave/array/Sparse.cc Sat Nov 25 17:35:36 2023 +0100 @@ -263,10 +263,10 @@ { // Work in unsigned long long to avoid overflow issues with numel - unsigned long long a_nel = static_cast(a.rows ()) * - static_cast(a.cols ()); - unsigned long long dv_nel = static_cast(dv(0)) * - static_cast(dv(1)); + unsigned long long a_nel = static_cast (a.rows ()) * + static_cast (a.cols ()); + unsigned long long dv_nel = static_cast (dv(0)) * + static_cast (dv(1)); if (a_nel != dv_nel) (*current_liboctave_error_handler) diff -r 14f76908db23 -r b962f1d4ad1b liboctave/array/dSparse.cc --- a/liboctave/array/dSparse.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/liboctave/array/dSparse.cc Sat Nov 25 17:35:36 2023 +0100 @@ -5837,7 +5837,7 @@ { octave_idx_type jr = j * b.rows (); for (octave_idx_type i = 0; i < b.rows (); i++) - retval.xelem (i, j) = static_cast(X->x)[jr + i]; + retval.xelem (i, j) = static_cast (X->x)[jr + i]; } CHOLMOD_NAME(free_dense) (&X, cm); @@ -6060,13 +6060,13 @@ (X, cm))); for (octave_idx_type j = 0; j <= static_cast (X->ncol); j++) - retval.xcidx (j) = static_cast(X->p)[j]; + retval.xcidx (j) = static_cast (X->p)[j]; for (octave_idx_type j = 0; j < octave::from_suitesparse_long (CHOLMOD_NAME(nnz) (X, cm)); j++) { - retval.xridx (j) = static_cast(X->i)[j]; - retval.xdata (j) = static_cast(X->x)[j]; + retval.xridx (j) = static_cast (X->i)[j]; + retval.xdata (j) = static_cast (X->x)[j]; } CHOLMOD_NAME(free_sparse) (&X, cm); @@ -6311,7 +6311,7 @@ { octave_idx_type jr = j * b.rows (); for (octave_idx_type i = 0; i < b.rows (); i++) - retval.xelem (i, j) = static_cast(X->x)[jr + i]; + retval.xelem (i, j) = static_cast (X->x)[jr + i]; } CHOLMOD_NAME(free_dense) (&X, cm); @@ -6555,13 +6555,13 @@ (X, cm))); for (octave_idx_type j = 0; j <= static_cast (X->ncol); j++) - retval.xcidx (j) = static_cast(X->p)[j]; + retval.xcidx (j) = static_cast (X->p)[j]; for (octave_idx_type j = 0; j < octave::from_suitesparse_long (CHOLMOD_NAME(nnz) (X, cm)); j++) { - retval.xridx (j) = static_cast(X->i)[j]; - retval.xdata (j) = static_cast(X->x)[j]; + retval.xridx (j) = static_cast (X->i)[j]; + retval.xdata (j) = static_cast (X->x)[j]; } CHOLMOD_NAME(free_sparse) (&X, cm); diff -r 14f76908db23 -r b962f1d4ad1b liboctave/array/dSparse.h --- a/liboctave/array/dSparse.h Sat Nov 25 16:51:49 2023 +0100 +++ b/liboctave/array/dSparse.h Sat Nov 25 17:35:36 2023 +0100 @@ -84,7 +84,7 @@ explicit OCTAVE_API SparseMatrix (const DiagMatrix& a); - explicit SparseMatrix (const PermMatrix& a) : MSparse(a) { } + explicit SparseMatrix (const PermMatrix& a) : MSparse (a) { } SparseMatrix (octave_idx_type r, octave_idx_type c, octave_idx_type num_nz) : MSparse (r, c, num_nz) { } diff -r 14f76908db23 -r b962f1d4ad1b liboctave/numeric/lo-mappers.cc --- a/liboctave/numeric/lo-mappers.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/liboctave/numeric/lo-mappers.cc Sat Nov 25 17:35:36 2023 +0100 @@ -184,7 +184,7 @@ nint_big (double x) { static const double out_of_range_top - = static_cast(std::numeric_limits::max ())+1.; + = static_cast (std::numeric_limits::max ())+1.; if (x >= out_of_range_top) return std::numeric_limits::max (); else if (x < std::numeric_limits::min ()) @@ -198,7 +198,7 @@ nint_big (float x) { static const float out_of_range_top - = static_cast(std::numeric_limits::max ())+1.; + = static_cast (std::numeric_limits::max ())+1.; if (x >= out_of_range_top) return std::numeric_limits::max (); else if (x < std::numeric_limits::min ()) @@ -223,7 +223,7 @@ nint (float x) { static const float out_of_range_top - = static_cast(std::numeric_limits::max ()) + 1.; + = static_cast (std::numeric_limits::max ()) + 1.; if (x >= out_of_range_top) return std::numeric_limits::max (); else if (x < std::numeric_limits::min ()) diff -r 14f76908db23 -r b962f1d4ad1b liboctave/numeric/oct-fftw.cc --- a/liboctave/numeric/oct-fftw.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/liboctave/numeric/oct-fftw.cc Sat Nov 25 17:35:36 2023 +0100 @@ -867,7 +867,7 @@ stride, dist, in, out); fftw_plan m_plan = reinterpret_cast (vplan); - fftw_execute_dft_r2c (m_plan, (const_cast(in)), + fftw_execute_dft_r2c (m_plan, (const_cast (in)), reinterpret_cast (out)); // Need to create other half of the transform. @@ -891,7 +891,7 @@ fftw_plan m_plan = reinterpret_cast (vplan); fftw_execute_dft (m_plan, - reinterpret_cast (const_cast(in)), + reinterpret_cast (const_cast (in)), reinterpret_cast (out)); return 0; @@ -910,7 +910,7 @@ fftw_plan m_plan = reinterpret_cast (vplan); fftw_execute_dft (m_plan, - reinterpret_cast (const_cast(in)), + reinterpret_cast (const_cast (in)), reinterpret_cast (out)); const Complex scale = npts; @@ -938,7 +938,7 @@ in, out + offset); fftw_plan m_plan = reinterpret_cast (vplan); - fftw_execute_dft_r2c (m_plan, (const_cast(in)), + fftw_execute_dft_r2c (m_plan, (const_cast (in)), reinterpret_cast (out+ offset)); // Need to create other half of the transform. @@ -961,7 +961,7 @@ fftw_plan m_plan = reinterpret_cast (vplan); fftw_execute_dft (m_plan, - reinterpret_cast (const_cast(in)), + reinterpret_cast (const_cast (in)), reinterpret_cast (out)); return 0; @@ -980,7 +980,7 @@ fftw_plan m_plan = reinterpret_cast (vplan); fftw_execute_dft (m_plan, - reinterpret_cast (const_cast(in)), + reinterpret_cast (const_cast (in)), reinterpret_cast (out)); const std::size_t npts = dv.numel (); @@ -1003,7 +1003,7 @@ dist, in, out); fftwf_plan m_plan = reinterpret_cast (vplan); - fftwf_execute_dft_r2c (m_plan, (const_cast(in)), + fftwf_execute_dft_r2c (m_plan, (const_cast (in)), reinterpret_cast (out)); // Need to create other half of the transform. @@ -1027,7 +1027,7 @@ fftwf_plan m_plan = reinterpret_cast (vplan); fftwf_execute_dft (m_plan, - reinterpret_cast (const_cast(in)), + reinterpret_cast (const_cast (in)), reinterpret_cast (out)); return 0; @@ -1047,7 +1047,7 @@ fftwf_plan m_plan = reinterpret_cast (vplan); fftwf_execute_dft (m_plan, - reinterpret_cast (const_cast(in)), + reinterpret_cast (const_cast (in)), reinterpret_cast (out)); const FloatComplex scale = npts; @@ -1075,7 +1075,7 @@ in, out + offset); fftwf_plan m_plan = reinterpret_cast (vplan); - fftwf_execute_dft_r2c (m_plan, (const_cast(in)), + fftwf_execute_dft_r2c (m_plan, (const_cast (in)), reinterpret_cast (out+ offset)); // Need to create other half of the transform. @@ -1098,7 +1098,7 @@ fftwf_plan m_plan = reinterpret_cast (vplan); fftwf_execute_dft (m_plan, - reinterpret_cast (const_cast(in)), + reinterpret_cast (const_cast (in)), reinterpret_cast (out)); return 0; @@ -1117,7 +1117,7 @@ fftwf_plan m_plan = reinterpret_cast (vplan); fftwf_execute_dft (m_plan, - reinterpret_cast (const_cast(in)), + reinterpret_cast (const_cast (in)), reinterpret_cast (out)); const std::size_t npts = dv.numel (); diff -r 14f76908db23 -r b962f1d4ad1b liboctave/numeric/sparse-chol.cc --- a/liboctave/numeric/sparse-chol.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/liboctave/numeric/sparse-chol.cc Sat Nov 25 17:35:36 2023 +0100 @@ -152,9 +152,9 @@ if (! S) return; - octave_idx_type *Sp = static_cast(S->p); - octave_idx_type *Si = static_cast(S->i); - chol_elt *Sx = static_cast(S->x); + octave_idx_type *Sp = static_cast (S->p); + octave_idx_type *Si = static_cast (S->i); + chol_elt *Sx = static_cast (S->x); octave_idx_type pdest = 0; octave_idx_type ncol = S->ncol; @@ -314,7 +314,7 @@ m_L->p, &n1, cm); CHOLMOD_NAME(reallocate_sparse) - (static_cast(m_L->p)[m_minor_p], + (static_cast (m_L->p)[m_minor_p], m_L, cm); m_L->ncol = m_minor_p; @@ -326,7 +326,7 @@ { m_perm.resize (a_nr); for (octave_idx_type i = 0; i < a_nr; i++) - m_perm(i) = static_cast(Lfactor->Perm)[i]; + m_perm(i) = static_cast (Lfactor->Perm)[i]; } } @@ -429,12 +429,12 @@ chol_type ret (m->nrow, nc, nnz); for (octave_idx_type j = 0; j < nc+1; j++) - ret.xcidx (j) = static_cast(m->p)[j]; + ret.xcidx (j) = static_cast (m->p)[j]; for (octave_idx_type i = 0; i < nnz; i++) { - ret.xridx (i) = static_cast(m->i)[i]; - ret.xdata (i) = static_cast(m->x)[i]; + ret.xridx (i) = static_cast (m->i)[i]; + ret.xdata (i) = static_cast (m->x)[i]; } return ret; diff -r 14f76908db23 -r b962f1d4ad1b liboctave/numeric/sparse-qr.cc --- a/liboctave/numeric/sparse-qr.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/liboctave/numeric/sparse-qr.cc Sat Nov 25 17:35:36 2023 +0100 @@ -1614,7 +1614,7 @@ for (octave_idx_type j = 0; j < nz; j++) { ret.xridx (j) = N->U->i[j]; - ret.xdata (j) = reinterpret_cast(N->U->x)[j]; + ret.xdata (j) = reinterpret_cast (N->U->x)[j]; } return ret; @@ -2079,7 +2079,7 @@ buf[j] = 0.0; CXSPARSE_ZNAME (_ipvec) (S->pinv, - reinterpret_cast(Xx), + reinterpret_cast (Xx), buf, nr); for (volatile octave_idx_type j = 0; j < nc; j++) @@ -2625,7 +2625,7 @@ for (octave_idx_type j = nr; j < nbuf; j++) buf[j] = 0.0; - CXSPARSE_ZNAME (_pvec) (S->q, reinterpret_cast(Xx), + CXSPARSE_ZNAME (_pvec) (S->q, reinterpret_cast (Xx), buf, nr); CXSPARSE_ZNAME (_utsolve) (N->U, buf); @@ -2637,7 +2637,7 @@ } CXSPARSE_ZNAME (_pvec) (S->pinv, buf, - reinterpret_cast(Xx), nc); + reinterpret_cast (Xx), nc); for (octave_idx_type j = 0; j < nc; j++) { diff -r 14f76908db23 -r b962f1d4ad1b liboctave/util/oct-string.cc --- a/liboctave/util/oct-string.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/liboctave/util/oct-string.cc Sat Nov 25 17:35:36 2023 +0100 @@ -660,7 +660,7 @@ }, &count); - if (count == static_cast(-1)) + if (count == static_cast (-1)) { encoding_list.push_back ("UTF-8"); return encoding_list; @@ -917,9 +917,9 @@ len = 10; static const T out_of_range_top - = static_cast(std::numeric_limits::max ()) + 1.; + = static_cast (std::numeric_limits::max ()) + 1.; static const T out_of_range_bottom - = static_cast(std::numeric_limits::min ()) - 1.; + = static_cast (std::numeric_limits::min ()) - 1.; if (octave::math::isinf (val)) { if (val > 0) diff -r 14f76908db23 -r b962f1d4ad1b liboctave/util/url-transfer.cc --- a/liboctave/util/url-transfer.cc Sat Nov 25 16:51:49 2023 +0100 +++ b/liboctave/util/url-transfer.cc Sat Nov 25 17:35:36 2023 +0100 @@ -604,7 +604,7 @@ SETOPTR (CURLOPT_HEADERFUNCTION, write_data); std::ostringstream buf; - SETOPTR (CURLOPT_WRITEHEADER, static_cast(&buf)); + SETOPTR (CURLOPT_WRITEHEADER, static_cast (&buf)); perform (); if (! good ())