Mercurial > octave
changeset 27532:2af853f94b97
use unwind_protect_var instead of unwind_protect object for a single var
* interpreter.cc (interpreter::initialize_load_path):
Use unwind_protect_var object instead of unwind_protect.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 18 Oct 2019 15:57:58 -0400 |
parents | 478150691336 |
children | 0abe70896e34 |
files | libinterp/corefcn/interpreter.cc |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/interpreter.cc Fri Oct 18 15:40:25 2019 -0400 +++ b/libinterp/corefcn/interpreter.cc Fri Oct 18 15:57:58 2019 -0400 @@ -890,11 +890,7 @@ std::string code_to_eval = options.code_to_eval (); - unwind_protect frame; - - frame.add_method (this, &interpreter::interactive, m_interactive); - - m_interactive = false; + unwind_protect_var<bool> upv (m_interactive, false); int parse_status = 0;