Mercurial > jwe > octave
changeset 31123:18b8f73595e0
Suppress warning for inline() when used intentionally in core Octave (bug #62682).
* fplot.m, __ezplot__.m: Temporarily suppress warning for "Octave:legacy-function" so
that intentional use of inline() does not produce a confusing warning.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 05 Jul 2022 10:38:41 -0700 |
parents | 46e15523ca06 |
children | df030ac26390 |
files | scripts/plot/draw/fplot.m scripts/plot/draw/private/__ezplot__.m |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/draw/fplot.m Tue Jul 05 08:57:15 2022 -0700 +++ b/scripts/plot/draw/fplot.m Tue Jul 05 10:38:41 2022 -0700 @@ -101,6 +101,8 @@ fcn = varargin{1}; if (isa (fcn, "inline")) + ## Don't warn about intentional use of inline functions (Bug #62682) + warning ("off", "Octave:legacy-function", "local"); fcn = vectorize (inline (fcn)); nam = formula (fcn); elseif (is_function_handle (fcn)) @@ -108,6 +110,8 @@ elseif (all (isalnum (fcn))) nam = fcn; elseif (ischar (fcn)) + ## Don't warn about intentional use of inline functions (Bug #62682) + warning ("off", "Octave:legacy-function", "local"); fcn = vectorize (inline (fcn)); nam = formula (fcn); else
--- a/scripts/plot/draw/private/__ezplot__.m Tue Jul 05 08:57:15 2022 -0700 +++ b/scripts/plot/draw/private/__ezplot__.m Tue Jul 05 10:38:41 2022 -0700 @@ -76,6 +76,8 @@ parametric = false; fcn = varargin{1}; + ## Don't warn about intentional use of inline functions (Bug #62682) + warning ("off", "Octave:legacy-function", "local"); if (ischar (fcn)) if (exist (fcn, "file") || exist (fcn, "builtin")) fcn = str2func (fcn); # convert to function handle