Mercurial > octave
changeset 23857:4d4ba038d103
Restore processing multiple '--eval' lines when launching Octave (bug #51708).
* octave.cc (cmdline::cmdline_options): Explicitly create std::string (" ")
before appending output of octave_optarg_wrapper which is <char *> type.
* bp-table.cc (parse_dbfunction_params): Use += operator for performance and
readability.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 09 Aug 2017 18:02:27 -0700 |
parents | 41a0b750c36e |
children | cb8251337689 |
files | libinterp/octave.cc libinterp/parse-tree/bp-table.cc |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave.cc Wed Aug 09 16:54:14 2017 -0700 +++ b/libinterp/octave.cc Wed Aug 09 18:02:27 2017 -0700 @@ -144,7 +144,8 @@ if (m_code_to_eval.empty ()) m_code_to_eval = octave_optarg_wrapper (); else - m_code_to_eval += ' ' + octave_optarg_wrapper (); + m_code_to_eval += (std::string (" ") + + octave_optarg_wrapper ()); } break;
--- a/libinterp/parse-tree/bp-table.cc Wed Aug 09 16:54:14 2017 -0700 +++ b/libinterp/parse-tree/bp-table.cc Wed Aug 09 18:02:27 2017 -0700 @@ -440,7 +440,7 @@ for (; pos < nargin; pos++) { if (args(pos).is_string ()) - cond = cond + ' ' + args(pos).string_value (); + cond += ' ' + args(pos).string_value (); else error ("%s: arguments to 'if' must all be strings", who); }