Mercurial > octave
diff libinterp/corefcn/cellfun.cc @ 29961:7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
Files affected: __betainc__.cc, __contourc__.cc, __eigs__.cc,
__expint__.cc, __ftp__.cc, __gammainc__.cc, __ichol__.cc, __ilu__.cc,
__magick_read__.cc, __pchip_deriv__.cc, __qp__.cc, amd.cc, balance.cc,
besselj.cc, bsxfun.cc, call-stack.cc, ccolamd.cc, cellfun.cc, chol.cc,
colamd.cc, colloc.cc, conv2.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc,
defaults.cc, dirfns.cc, display.cc, dlmread.cc, dmperm.cc, dot.cc,
eig.cc, ellipj.cc, environment.cc, error.cc, event-manager.cc, fft.cc,
fft2.cc, fftn.cc, file-io.cc, find.cc, gcd.cc, getgrent.cc,
getpwent.cc, getrusage.cc, gsvd.cc, hash.cc, help.cc, hess.cc,
hex2num.cc, input.cc, inv.cc, jsondecode.cc, jsonencode.cc,
load-path.cc, load-save.cc, lookup.cc, lsode.cc, lu.cc, max.cc,
mgorth.cc, oct-hist.cc, ordqz.cc, ordschur.cc, pager.cc, pr-output.cc,
psi.cc, qr.cc, quad.cc, quadcc.cc, qz.cc, rand.cc, regexp.cc,
schur.cc, settings.cc, sighandlers.cc, sparse.cc, spparms.cc,
sqrtm.cc, stream-euler.cc, strfind.cc, strfns.cc, sub2ind.cc, svd.cc,
symbfact.cc, symtab.cc, syscalls.cc, sysdep.cc, time.cc, toplev.cc,
tril.cc, typecast.cc, urlwrite.cc, utils.cc, variables.cc,
__delaunayn__.cc, __fltk_uigetfile__.cc, __glpk__.cc,
__init_gnuplot__.cc, __ode15__.cc, __voronoi__.cc, audiodevinfo.cc,
audioread.cc, convhulln.cc, fftw.cc, gzip.cc, ov-cell.cc, ov-class.cc,
ov-classdef.cc, ov-fcn-handle.cc, ov-struct.cc, ov-typeinfo.cc,
ov-usr-fcn.cc, octave.cc, lex.ll, oct-parse.yy, profiler.cc,
andpt-eval.cc.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 14 Aug 2021 22:48:52 -0400 |
parents | 32c3a5805893 |
children | f69f749aad9b |
line wrap: on
line diff
--- a/libinterp/corefcn/cellfun.cc Sat Aug 14 21:50:26 2021 -0400 +++ b/libinterp/corefcn/cellfun.cc Sat Aug 14 22:48:52 2021 -0400 @@ -68,7 +68,7 @@ OCTAVE_NAMESPACE_BEGIN static octave_value_list -get_output_list (octave::error_system& es, +get_output_list (error_system& es, octave_idx_type count, octave_idx_type nargout, const octave_value_list& inputlist, octave_value& func, @@ -80,14 +80,14 @@ try { - tmp = octave::feval (func, inputlist, nargout); + tmp = feval (func, inputlist, nargout); } - catch (const octave::execution_exception& ee) + catch (const execution_exception& ee) { if (error_handler.is_defined ()) { - octave::interpreter& interp - = octave::__get_interpreter__ ("get_output_list"); + interpreter& interp + = __get_interpreter__ ("get_output_list"); es.save_exception (ee); interp.recover_from_exception (); @@ -112,7 +112,7 @@ octave_value_list errlist = inputlist; errlist.prepend (msg); - tmp = octave::feval (error_handler, errlist, nargout); + tmp = feval (error_handler, errlist, nargout); } else tmp.clear (); @@ -225,7 +225,7 @@ } static void -get_mapper_fun_options (octave::symbol_table& symtab, +get_mapper_fun_options (symbol_table& symtab, const octave_value_list& args, int& nargin, bool& uniform_output, octave_value& error_handler) @@ -237,9 +237,9 @@ std::size_t compare_len = std::max (arg.length (), static_cast<std::size_t> (2)); - if (octave::string::strncmpi (arg, "uniformoutput", compare_len)) + if (string::strncmpi (arg, "uniformoutput", compare_len)) uniform_output = args(nargin-1).bool_value (); - else if (octave::string::strncmpi (arg, "errorhandler", compare_len)) + else if (string::strncmpi (arg, "errorhandler", compare_len)) { if (args(nargin-1).is_function_handle () || args(nargin-1).is_inline_function ()) @@ -419,7 +419,7 @@ octave_value func = args(0); - octave::symbol_table& symtab = interp.get_symbol_table (); + symbol_table& symtab = interp.get_symbol_table (); if (func.is_string ()) { @@ -432,8 +432,8 @@ std::string name = args(0).string_value (); - if (! octave::valid_identifier (name)) - func = octave::get_function_handle (interp, args(0), "x"); + if (! valid_identifier (name)) + func = get_function_handle (interp, args(0), "x"); else { func = symtab.find_function (name); @@ -537,7 +537,7 @@ } } - octave::error_system& es = interp.get_error_system (); + error_system& es = interp.get_error_system (); // Apply functions. @@ -1149,15 +1149,15 @@ bool symbol_table_lookup = false; octave_value func = args(0); - octave::symbol_table& symtab = interp.get_symbol_table (); + symbol_table& symtab = interp.get_symbol_table (); if (func.is_string ()) { // See if we can convert the string into a function. std::string name = args(0).string_value (); - if (! octave::valid_identifier (name)) - func = octave::get_function_handle (interp, args(0), "x"); + if (! valid_identifier (name)) + func = get_function_handle (interp, args(0), "x"); else { func = symtab.find_function (name); @@ -1243,7 +1243,7 @@ } } - octave::error_system& es = interp.get_error_system (); + error_system& es = interp.get_error_system (); // Apply functions. @@ -1923,14 +1923,14 @@ { octave_idx_type nidx = (idim < nd ? d[idim].numel () : 1); if (nidx == 1) - idx[0] = octave::idx_vector::colon; + idx[0] = idx_vector::colon; else { octave_idx_type l = 0; for (octave_idx_type i = 0; i < nidx; i++) { octave_idx_type u = l + d[idim](i); - idx[i] = octave::idx_vector (l, u); + idx[i] = idx_vector (l, u); l = u; } } @@ -1968,17 +1968,17 @@ for (octave_idx_type i = 0; i < nidx; i++) { octave_idx_type u = l + d[ivec](i); - retval.xelem (i) = a.index (octave::idx_vector (l, u)); + retval.xelem (i) = a.index (idx_vector (l, u)); l = u; } } else { // General 2D case. Use 2D indexing. - OCTAVE_LOCAL_BUFFER (octave::idx_vector, ridx, nridx); + OCTAVE_LOCAL_BUFFER (idx_vector, ridx, nridx); prepare_idx (ridx, 0, nd, d); - OCTAVE_LOCAL_BUFFER (octave::idx_vector, cidx, ncidx); + OCTAVE_LOCAL_BUFFER (idx_vector, cidx, ncidx); prepare_idx (cidx, 1, nd, d); for (octave_idx_type j = 0; j < ncidx; j++) @@ -2017,8 +2017,8 @@ retval.clear (rdv); - OCTAVE_LOCAL_BUFFER (octave::idx_vector, xidx, idxtot); - OCTAVE_LOCAL_BUFFER (octave::idx_vector *, idx, nd); + OCTAVE_LOCAL_BUFFER (idx_vector, xidx, idxtot); + OCTAVE_LOCAL_BUFFER (idx_vector *, idx, nd); idxtot = 0; for (int i = 0; i < nd; i++) @@ -2029,8 +2029,8 @@ } OCTAVE_LOCAL_BUFFER_INIT (octave_idx_type, ridx, nd, 0); - Array<octave::idx_vector> ra_idx - (dim_vector (1, std::max (nd, a.ndims ())), octave::idx_vector::colon); + Array<idx_vector> ra_idx + (dim_vector (1, std::max (nd, a.ndims ())), idx_vector::colon); for (octave_idx_type j = 0; j < retval.numel (); j++) { @@ -2303,7 +2303,7 @@ || (dim == 1 && array.rows () == 1))) { for (octave_idx_type i = 0; i < n; i++) - retval.xelem (i) = array.index (octave::idx_vector (lb(i) - 1, ub(i))); + retval.xelem (i) = array.index (idx_vector (lb(i) - 1, ub(i))); } else { @@ -2313,11 +2313,11 @@ dim = dv.first_non_singleton (); ndims = std::max (ndims, dim + 1); - Array<octave::idx_vector> idx (dim_vector (ndims, 1), octave::idx_vector::colon); + Array<idx_vector> idx (dim_vector (ndims, 1), idx_vector::colon); for (octave_idx_type i = 0; i < n; i++) { - idx(dim) = octave::idx_vector (lb(i) - 1, ub(i)); + idx(dim) = idx_vector (lb(i) - 1, ub(i)); retval.xelem (i) = array.index (idx); } } @@ -2437,7 +2437,7 @@ octave_value_list idx (ndims, octave_value::magic_colon_t); for (octave_idx_type i = 0; i < n; i++) { - idx(dim) = octave::range<double> (lb(i), ub(i)); + idx(dim) = range<double> (lb(i), ub(i)); retcell.xelem (i) = x.index_op (idx); } }