Mercurial > octave
changeset 33038:a71bde898ef9 bytecode-interpreter
maint: merge default to bytecode-interpreter
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 16 Feb 2024 14:56:20 -0500 |
parents | 1220b63eea0e (current diff) 4c98d5d31993 (diff) |
children | 4c9dc46fae39 |
files | libinterp/corefcn/call-stack.cc libinterp/corefcn/load-path.cc libinterp/parse-tree/pt-eval.cc |
diffstat | 49 files changed, 172 insertions(+), 192 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/graphics/Canvas.cc Fri Feb 16 14:56:20 2024 -0500 @@ -902,7 +902,7 @@ props.prepend (figObj.get_handle ().as_octave_value ()); emit interpreter_event - ([=] (octave::interpreter& interp) + ([this, props] (octave::interpreter& interp) { // INTERPRETER THREAD
--- a/libgui/graphics/GLCanvas.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/graphics/GLCanvas.cc Fri Feb 16 14:56:20 2024 -0500 @@ -69,7 +69,7 @@ { begin_rendering (); - unwind_action reset_current ([=] () { end_rendering (); }); + unwind_action reset_current ([this] () { end_rendering (); }); graphics_object fig = go.get_ancestor ("figure"); double dpr = fig.get ("__device_pixel_ratio__").double_value (); @@ -94,7 +94,7 @@ begin_rendering (); - unwind_action reset_current ([=] () { end_rendering (); }); + unwind_action reset_current ([this] () { end_rendering (); }); // When the figure is not visible or its size is frozen for printing, // we use a framebuffer object to make sure we are rendering on a @@ -108,7 +108,7 @@ fbo.bind (); - unwind_action release_fbo ([&] () { fbo.release (); }); + unwind_action release_fbo ([&fbo] () { fbo.release (); }); m_renderer.set_viewport (pos(2), pos(3)); m_renderer.set_device_pixel_ratio (dpr); @@ -137,7 +137,7 @@ { begin_rendering (); - unwind_action reset_current ([=] () { end_rendering (); }); + unwind_action reset_current ([this] () { end_rendering (); }); graphics_object fig (go.get_ancestor ("figure")); @@ -159,7 +159,7 @@ fbo.bind (); - unwind_action release_fbo ([&] () { fbo.release (); }); + unwind_action release_fbo ([&fbo] () { fbo.release (); }); octave::gl2ps_print (m_glfcns, fig, file_cmd.toStdString (), term.toStdString ()); @@ -174,7 +174,7 @@ { begin_rendering (); - unwind_action reset_current ([=] () { end_rendering (); }); + unwind_action reset_current ([this] () { end_rendering (); }); octave::opengl_selector s (m_glfcns); @@ -201,7 +201,7 @@ begin_rendering (); - unwind_action reset_current ([=] () { end_rendering (); }); + unwind_action reset_current ([this] () { end_rendering (); }); m_renderer.draw_zoom_box (width (), height (), p1.x (), p1.y (), p2.x (), p2.y (), @@ -348,7 +348,7 @@ catch (octave::execution_exception& ee) { emit interpreter_event - ([=] () + ([ee] () { // INTERPRETER THREAD throw ee;
--- a/libgui/qterminal/libqterminal/QTerminal.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/qterminal/libqterminal/QTerminal.cc Fri Feb 16 14:56:20 2024 -0500 @@ -195,7 +195,7 @@ std::string expr = m_doc_selected_action->data ().toString ().toStdString (); emit interpreter_event - ([=] (octave::interpreter& interp) + ([expr] (octave::interpreter& interp) { // INTERPRETER THREAD
--- a/libgui/src/command-widget.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/command-widget.cc Fri Feb 16 14:56:20 2024 -0500 @@ -110,7 +110,7 @@ QPointer<command_widget> this_cw (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_cw] (interpreter& interp) { // INTERPRETER THREAD @@ -158,7 +158,7 @@ QPointer<command_widget> this_cw (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_cw, input_line] (interpreter& interp) { // INTERPRETER THREAD
--- a/libgui/src/documentation.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/documentation.cc Fri Feb 16 14:56:20 2024 -0500 @@ -184,7 +184,7 @@ QLabel *find_label = new QLabel (tr ("Find:"), find_footer); m_find_line_edit = new QLineEdit (find_footer); connect (m_find_line_edit, &QLineEdit::returnPressed, - this, [=] () { find (); }); + this, [this] () { find (); }); connect (m_find_line_edit, &QLineEdit::textEdited, this, &documentation::find_forward_from_anchor); QToolButton *forward_button = new QToolButton (find_footer); @@ -195,7 +195,7 @@ forward_button->setIcon (settings.icon ("go-down")); connect (forward_button, &QToolButton::pressed, - this, [=] () { find (); }); + this, [this] () { find (); }); QToolButton *backward_button = new QToolButton (find_footer); backward_button->setText (tr ("Search backward")); backward_button->setToolTip (tr ("Search backward")); @@ -220,7 +220,7 @@ m_findnext_shortcut->setContext (Qt::WidgetWithChildrenShortcut); connect (m_findnext_shortcut, &QShortcut::activated, - this, [=] () { find (); }); + this, [this] () { find (); }); m_findprev_shortcut->setContext (Qt::WidgetWithChildrenShortcut); connect (m_findprev_shortcut, &QShortcut::activated, this, &documentation::find_backward); @@ -246,8 +246,7 @@ connect (m_help_engine->contentWidget (), &QHelpContentWidget::linkActivated, - m_doc_browser, [=] (const QUrl& url) { - m_doc_browser->handle_index_clicked (url); }); + m_doc_browser, [this] (const QUrl& url) { m_doc_browser->handle_index_clicked (url); }); // Index QHelpIndexWidget *index = m_help_engine->indexWidget (); @@ -283,8 +282,7 @@ #if defined (HAVE_NEW_QHELPINDEXWIDGET_API) connect (m_help_engine->indexWidget (), &QHelpIndexWidget::documentActivated, - this, [=] (const QHelpLink &link) { - m_doc_browser->handle_index_clicked (link.url); }); + this, [this] (const QHelpLink &link) { m_doc_browser->handle_index_clicked (link.url); }); #else connect (m_help_engine->indexWidget (), &QHelpIndexWidget::linkActivated, @@ -302,7 +300,7 @@ navi->addTab (m_bookmarks, tr ("Bookmarks")); connect (m_action_bookmark, &QAction::triggered, - m_bookmarks, [=] () { m_bookmarks->add_bookmark (); }); + m_bookmarks, [this] () { m_bookmarks->add_bookmark (); }); // Search QHelpSearchEngine *search_engine = m_help_engine->searchEngine (); @@ -1060,7 +1058,7 @@ { setOpenLinks (false); connect (this, &documentation_browser::anchorClicked, - this, [=] (const QUrl& url) { handle_index_clicked (url); }); + this, [this] (const QUrl& url) { handle_index_clicked (url); }); // Make sure we have access to one of the monospace fonts listed in // octave.css for rendering formated code blocks
--- a/libgui/src/files-dock-widget.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/files-dock-widget.cc Fri Feb 16 14:56:20 2024 -0500 @@ -171,9 +171,7 @@ // actually restrict the selection, we have to post the modification at // the end of the event loop. // QTimer allows this easily with 0 as timeout. - QTimer::singleShot (0, [=] () { - line_edit->setSelection (0, select_len); - }); + QTimer::singleShot (0, [line_edit, select_len] () { line_edit->setSelection (0, select_len); }); } }; @@ -677,7 +675,7 @@ QMenu *add_path_menu = menu.addMenu (tr ("Add to Path")); add_path_menu->addAction (tr ("Selected Directories"), - this, [=] (bool checked) { contextmenu_add_to_path (checked); }); + this, [this] (bool checked) { contextmenu_add_to_path (checked); }); add_path_menu->addAction (tr ("Selected Directories and Subdirectories"), this, &files_dock_widget::contextmenu_add_to_path_subdirs);
--- a/libgui/src/interpreter-qobject.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/interpreter-qobject.cc Fri Feb 16 14:56:20 2024 -0500 @@ -191,7 +191,7 @@ // interpreter is paused. interpreter_event - ([=] (interpreter& interp) + ([] (interpreter& interp) { // INTERPRETER THREAD
--- a/libgui/src/m-editor/file-editor-tab.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/m-editor/file-editor-tab.cc Fri Feb 16 14:56:20 2024 -0500 @@ -246,7 +246,7 @@ this, SLOT (handle_copy_available (bool))); connect (&m_file_system_watcher, &QFileSystemWatcher::fileChanged, - this, [=] (const QString& path) { file_has_changed (path); }); + this, [this] (const QString& path) { file_has_changed (path); }); connect (this, &file_editor_tab::maybe_remove_next, this, &file_editor_tab::handle_remove_next); @@ -448,7 +448,7 @@ QPointer<file_editor_tab> this_fetab (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_fetab, line, new_cond] (interpreter& interp) { // INTERPRETER THREAD @@ -853,7 +853,7 @@ QPointer<file_editor_tab> this_fetab (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_fetab, octave_builtins, octave_functions] (interpreter& interp) { // INTERPRETER THREAD @@ -1240,7 +1240,7 @@ file_editor_tab::handle_request_remove_breakpoint (int line) { emit interpreter_event - ([=] (interpreter& interp) + ([this, line] (interpreter& interp) { // INTERPRETER THREAD @@ -1322,7 +1322,7 @@ return; emit interpreter_event - ([=] (interpreter& interp) + ([this] (interpreter& interp) { // INTERPRETER THREAD @@ -1442,7 +1442,7 @@ QPointer<file_editor_tab> this_fetab (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_fetab, line, cond] (interpreter& interp) { // INTERPRETER THREAD @@ -2017,7 +2017,7 @@ msg_box->show (); } - unwind_action free_u16_str ([=] () { ::free (u16_str); }); + unwind_action free_u16_str ([u16_str] () { ::free (u16_str); }); QString text = QString::fromUtf16 (reinterpret_cast<char16_t *> (u16_str), length); @@ -2173,7 +2173,7 @@ QPointer<file_editor_tab> this_fetab (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_fetab] (interpreter& interp) { // INTERPRETER THREAD @@ -2251,7 +2251,7 @@ QPointer<file_editor_tab> this_fetab (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_fetab, base_name, file_to_save, remove_on_success, restore_breakpoints] (interpreter& interp) { // INTERPRETER THREAD @@ -2320,7 +2320,7 @@ QPointer<file_editor_tab> this_fetab (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_fetab, base_name, file_to_save, remove_on_success, restore_breakpoints] (interpreter& interp) { // INTERPRETER THREAD
--- a/libgui/src/m-editor/file-editor.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/m-editor/file-editor.cc Fri Feb 16 14:56:20 2024 -0500 @@ -723,7 +723,7 @@ QPointer<file_editor> this_fe (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_fe] (interpreter& interp) { // INTERPRETER THREAD @@ -2614,7 +2614,7 @@ this, &file_editor::handle_mru_add_file); connect (f, &file_editor_tab::request_open_file, - this, [=] (const QString& fname, const QString& encoding) { request_open_file (fname, encoding); }); + this, [this] (const QString& fname, const QString& encoding) { request_open_file (fname, encoding); }); connect (f, &file_editor_tab::edit_area_changed, this, &file_editor::edit_area_changed); @@ -2624,7 +2624,7 @@ // Signals from the file_editor or main-win non-trivial operations connect (this, &file_editor::fetab_settings_changed, - f, [=] () { f->notice_settings (); }); + f, [f] () { f->notice_settings (); }); connect (this, &file_editor::fetab_change_request, f, &file_editor_tab::change_editor_state);
--- a/libgui/src/m-editor/octave-qscintilla.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/m-editor/octave-qscintilla.cc Fri Feb 16 14:56:20 2024 -0500 @@ -344,7 +344,7 @@ std::string name = m_word_at_cursor.toStdString (); emit interpreter_event - ([=] (interpreter& interp) + ([name] (interpreter& interp) { // INTERPRETER THREAD @@ -938,7 +938,7 @@ // Add commands to the history emit interpreter_event - ([=] (interpreter& interp) + ([tmp_hist] (interpreter& interp) { // INTERPRETER THREAD @@ -965,7 +965,7 @@ // Let the interpreter execute the tmp file emit interpreter_event - ([=] (interpreter& interp) + ([this, this_oq, tmp_file, tmp_hist, show_dbg_file] (interpreter& interp) { // INTERPRETER THREAD @@ -1103,7 +1103,7 @@ tmp_hist->remove (); emit interpreter_event - ([=] (interpreter& interp) + ([dbg, auto_repeat] (interpreter& interp) { // INTERPRETER THREAD if (dbg)
--- a/libgui/src/main-window.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/main-window.cc Fri Feb 16 14:56:20 2024 -0500 @@ -675,7 +675,7 @@ if (! file.isEmpty ()) { emit interpreter_event - ([=] (interpreter& interp) + ([file] (interpreter& interp) { // INTERPRETER THREAD @@ -704,7 +704,7 @@ if (! file.isEmpty ()) { emit interpreter_event - ([=] (interpreter& interp) + ([file] (interpreter& interp) { // INTERPRETER THREAD @@ -727,7 +727,7 @@ std::string file = file_arg.toStdString (); emit interpreter_event - ([=] (interpreter& interp) + ([file] (interpreter& interp) { // INTERPRETER THREAD @@ -806,7 +806,7 @@ bool rm, bool subdirs) { emit interpreter_event - ([=] (interpreter& interp) + ([dir_list, subdirs, rm] (interpreter& interp) { // INTERPRETER THREAD @@ -1129,7 +1129,7 @@ if (fileInfo.exists () && fileInfo.isDir ()) { emit interpreter_event - ([=] (interpreter& interp) + ([xdir] (interpreter& interp) { // INTERPRETER THREAD @@ -1173,7 +1173,7 @@ else { emit interpreter_event - ([=] () + ([command] () { // INTERPRETER THREAD @@ -1194,7 +1194,7 @@ main_window::run_file_in_terminal (const QFileInfo& info) { emit interpreter_event - ([=] (interpreter& interp) + ([info] (interpreter& interp) { // INTERPRETER THREAD @@ -1276,7 +1276,7 @@ main_window::debug_continue () { emit interpreter_event - ([=] (interpreter& interp) + ([this] (interpreter& interp) { // INTERPRETER THREAD @@ -1291,7 +1291,7 @@ main_window::debug_step_into () { emit interpreter_event - ([=] (interpreter& interp) + ([this] (interpreter& interp) { // INTERPRETER THREAD @@ -1310,7 +1310,7 @@ // We are in debug mode, just call dbstep. emit interpreter_event - ([=] (interpreter& interp) + ([this] (interpreter& interp) { // INTERPRETER THREAD @@ -1332,7 +1332,7 @@ main_window::debug_step_out () { emit interpreter_event - ([=] (interpreter& interp) + ([this] (interpreter& interp) { // INTERPRETER THREAD @@ -1455,7 +1455,7 @@ QPointer<main_window> this_mw (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_mw, fname, ffile, curr_dir, line] (interpreter& interp) { // INTERPRETER THREAD @@ -1855,7 +1855,7 @@ QPointer<main_window> this_mw (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_mw] (interpreter& interp) { // INTERPRETER_THREAD @@ -1951,7 +1951,7 @@ main_window::set_screen_size (int ht, int wd) { emit interpreter_event - ([=] () + ([ht, wd] () { // INTERPRETER THREAD @@ -2024,7 +2024,7 @@ main_window::profiler_session () { emit interpreter_event - ([=] (interpreter& interp) + ([] (interpreter& interp) { // INTERPRETER THREAD F__profiler_enable__ (interp, ovl (true)); @@ -2035,7 +2035,7 @@ main_window::profiler_session_resume () { emit interpreter_event - ([=] (interpreter& interp) + ([] (interpreter& interp) { // INTERPRETER THREAD F__profiler_enable__ (interp, ovl (true)); @@ -2046,7 +2046,7 @@ main_window::profiler_stop () { emit interpreter_event - ([=] (interpreter& interp) + ([] (interpreter& interp) { // INTERPRETER THREAD F__profiler_enable__ (interp, ovl (false)); @@ -2150,7 +2150,7 @@ // Default argument requires wrapper. connect (this, &main_window::settings_changed, - this, [=] () { notice_settings (); }); + this, [this] () { notice_settings (); }); // Connections for signals from the interpreter thread where the slot // should be executed by the gui thread @@ -2201,7 +2201,7 @@ this, &main_window::handle_exit_debugger); connect (qt_link, &qt_interpreter_events::show_preferences_signal, - this, [=] () { process_settings_dialog_request (); }); + this, [this] () { process_settings_dialog_request (); }); connect (qt_link, &qt_interpreter_events::insert_debugger_pointer_signal, this, &main_window::handle_insert_debugger_pointer_request); @@ -2419,7 +2419,7 @@ tr ("Preferences...")); connect (m_find_files_action, &QAction::triggered, - this, [=] () { find_files (); }); + this, [this] () { find_files (); }); connect (m_clear_command_window_action, &QAction::triggered, this, &main_window::handle_clear_command_window_request); @@ -2442,7 +2442,7 @@ #endif connect (m_preferences_action, &QAction::triggered, - this, [=] () { process_settings_dialog_request (); }); + this, [this] () { process_settings_dialog_request (); }); connect (m_set_path_action, &QAction::triggered, this, &main_window::handle_set_path_dialog_request); @@ -2672,17 +2672,13 @@ m_release_notes_action = news_menu->addAction (QIcon (), tr ("Release Notes"), - [=] () { - emit show_release_notes_signal (); - }); + [this] () { emit show_release_notes_signal (); }); addAction (m_release_notes_action); m_release_notes_action->setShortcutContext (Qt::ApplicationShortcut); m_current_news_action = news_menu->addAction (QIcon (), tr ("Community News"), - [=] () { - emit show_community_news_signal (-1); - }); + [this] () { emit show_community_news_signal (-1); }); addAction (m_current_news_action); m_current_news_action->setShortcutContext (Qt::ApplicationShortcut); } @@ -2863,7 +2859,7 @@ mfile_encoding = "SYSTEM"; emit interpreter_event - ([=] (interpreter& interp) + ([mfile_encoding] (interpreter& interp) { // INTERPRETER THREAD @@ -2910,7 +2906,7 @@ // connections so that the event loop can do what it needs to do. // But I haven't been able to find the magic sequence. - QTimer::singleShot (250, this, [=] () { do_reset_windows (true, true, true); }); + QTimer::singleShot (250, this, [this] () { do_reset_windows (true, true, true); }); } // Create the default layout of the main window. Do not use
--- a/libgui/src/octave-dock-widget.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/octave-dock-widget.cc Fri Feb 16 14:56:20 2024 -0500 @@ -215,7 +215,7 @@ connect (this, &octave_dock_widget::queue_make_window, this, &octave_dock_widget::make_window, Qt::QueuedConnection); connect (this, &octave_dock_widget::queue_make_widget, - this, [=] () { make_widget (); }, Qt::QueuedConnection); + this, [this] () { make_widget (); }, Qt::QueuedConnection); gui_settings settings;
--- a/libgui/src/octave-qobject.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/octave-qobject.cc Fri Feb 16 14:56:20 2024 -0500 @@ -152,7 +152,7 @@ catch (execution_exception& ee) { emit interpreter_event - ([=] () + ([ee] () { // INTERPRETER THREAD throw ee; @@ -584,7 +584,7 @@ m_history_widget, &history_dock_widget::clear_history); emit interpreter_event - ([=] (interpreter& interp) { + ([] (interpreter& interp) { // INTERPRETER THREAD event_manager& xevmgr = interp.get_event_manager (); @@ -622,9 +622,9 @@ connect (m_workspace_widget, &workspace_view::copy_variable_value_to_clipboard, - [=] (const QString& var_name) { + [this] (const QString& var_name) { emit interpreter_event - ([=] (interpreter& interp) + ([var_name] (interpreter& interp) { // INTERPRETER THREAD @@ -645,9 +645,9 @@ }); connect (m_workspace_widget, &workspace_view::rename_variable_signal, - [=] (const QString& old_name, const QString& new_name) { + [this] (const QString& old_name, const QString& new_name) { emit interpreter_event - ([=] (interpreter& interp) { + ([old_name, new_name] (interpreter& interp) { // INTERPRETER THREAD symbol_scope scope = interp.get_current_scope (); @@ -670,9 +670,9 @@ }); connect (m_workspace_widget, &workspace_view::edit_variable_signal, - [=] (const QString& var_name) { + [this] (const QString& var_name) { emit interpreter_event - ([=] (interpreter& interp) { + ([var_name] (interpreter& interp) { // INTERPRETER THREAD std::string name = var_name.toStdString (); @@ -685,7 +685,7 @@ }); emit interpreter_event - ([=] (interpreter& interp) { + ([] (interpreter& interp) { // INTERPRETER THREAD event_manager& xevmgr = interp.get_event_manager (); @@ -936,7 +936,7 @@ base_qobject::execute_command (const QString& command) { emit interpreter_event - ([=] (interpreter& interp) + ([command] (interpreter& interp) { // INTERPRETER THREAD @@ -963,7 +963,7 @@ // returning to the command line? interpreter_event - ([=] (interpreter& interp) + ([] (interpreter& interp) { // INTERPRETER THREAD
--- a/libgui/src/set-path-model.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/set-path-model.cc Fri Feb 16 14:56:20 2024 -0500 @@ -80,7 +80,7 @@ std::string path_str = to_string (); emit interpreter_event - ([=] (interpreter& interp) + ([path_str] (interpreter& interp) { // INTERPRETER THREAD @@ -305,7 +305,7 @@ QPointer<set_path_model> this_spm (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_spm] (interpreter& interp) { // INTERPRETER THREAD
--- a/libgui/src/settings-dialog.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/settings-dialog.cc Fri Feb 16 14:56:20 2024 -0500 @@ -579,7 +579,7 @@ connect (cb_color_mode, &QCheckBox::stateChanged, this, &settings_dialog::update_editor_lexers); connect (pb_reload_default_colors, &QPushButton::clicked, - [=] () { update_editor_lexers (settings_reload_default_colors_flag); }); + [this] () { update_editor_lexers (settings_reload_default_colors_flag); }); // finally read the lexer colors using the update slot update_editor_lexers (); @@ -1489,7 +1489,7 @@ connect (cb_color_mode, &QCheckBox::stateChanged, this, &settings_dialog::update_workspace_colors); connect (pb_reload_default_colors, &QPushButton::clicked, - [=] () { update_workspace_colors (settings_reload_default_colors_flag); }); + [this] () { update_workspace_colors (settings_reload_default_colors_flag); }); } void @@ -1604,7 +1604,7 @@ connect (cb_color_mode, &QCheckBox::stateChanged, this, &settings_dialog::update_terminal_colors); connect (pb_reload_default_colors, &QPushButton::clicked, - [=] () { update_terminal_colors (settings_reload_default_colors_flag); }); + [this] () { update_terminal_colors (settings_reload_default_colors_flag); }); } void @@ -1717,7 +1717,7 @@ connect (cb_color_mode, &QCheckBox::stateChanged, this, &settings_dialog::update_varedit_colors); connect (pb_reload_default_colors, &QPushButton::clicked, - [=] () { update_varedit_colors (settings_reload_default_colors_flag); }); + [this] () { update_varedit_colors (settings_reload_default_colors_flag); }); } void
--- a/libgui/src/variable-editor-model.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/variable-editor-model.cc Fri Feb 16 14:56:20 2024 -0500 @@ -1008,7 +1008,7 @@ QPointer<variable_editor_model> this_vem (this); emit interpreter_event - ([=] (interpreter& interp) + ([this, this_vem, expr, nm, idx] (interpreter& interp) { // INTERPRETER THREAD @@ -1163,7 +1163,7 @@ std::string expr = expr_arg.toStdString (); emit interpreter_event - ([=] (interpreter& interp) + ([this, expr] (interpreter& interp) { // INTERPRETER THREAD @@ -1235,7 +1235,7 @@ variable_editor_model::update_data_cache () { emit interpreter_event - ([=] (interpreter& interp) + ([this] (interpreter& interp) { // INTERPRETER_THREAD
--- a/libgui/src/variable-editor.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libgui/src/variable-editor.cc Fri Feb 16 14:56:20 2024 -0500 @@ -465,7 +465,7 @@ // No format given, test save default options emit interpreter_event - ([=] (interpreter& interp) + ([this, this_ves, format_string] (interpreter& interp) { // INTERPRETER THREAD @@ -520,7 +520,7 @@ // Let the interpreter thread do the saving emit interpreter_event - ([=] (interpreter& interp) + ([file, name, format] (interpreter& interp) { // INTERPRETER THREAD @@ -1308,7 +1308,7 @@ connect (this, &variable_editor::level_up_signal, stack, &variable_editor_stack::levelUp); connect (this, &variable_editor::save_signal, - stack, [=] () { stack->save (); }); + stack, [stack] () { stack->save (); }); variable_editor_view *edit_view = stack->edit_view ();
--- a/libinterp/corefcn/call-stack.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/corefcn/call-stack.cc Fri Feb 16 14:56:20 2024 -0500 @@ -1161,7 +1161,7 @@ push (tmp_scope); - unwind_action restore_scope ([=] () { pop (); }); + unwind_action restore_scope ([this] () { pop (); }); interpreter& interp = m_evaluator.get_interpreter ();
--- a/libinterp/corefcn/data.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/corefcn/data.cc Fri Feb 16 14:56:20 2024 -0500 @@ -3872,7 +3872,7 @@ @deftypefn {} {@var{tf} =} isscalar (@var{x}) Return true if @var{x} is a scalar. -A scalar is an object with two dimensions for which @code{size (@var{x})} +A scalar is a single-element object of any type for which @code{size (@var{x})} returns @w{@code{[1, 1]}}. @seealso{isvector, ismatrix, size} @end deftypefn */) @@ -3911,9 +3911,9 @@ @deftypefn {} {@var{tf} =} isvector (@var{x}) Return true if @var{x} is a vector. -A vector is a 2-D object where one of the dimensions is equal to 1 (either -@nospell{1xN} or @nospell{Nx1}). As a consequence of this definition, a 1x1 -object (a scalar) is also a vector. +A vector is a 2-D array of any type where one of the dimensions is equal to 1 +(either @nospell{1xN} or @nospell{Nx1}). As a consequence of this definition, +a 1x1 object (a scalar) is also a vector. @seealso{isscalar, ismatrix, iscolumn, isrow, size} @end deftypefn */) { @@ -3952,7 +3952,7 @@ @deftypefn {} {@var{tf} =} isrow (@var{x}) Return true if @var{x} is a row vector. -A row vector is a 2-D object for which @code{size (@var{x})} returns +A row vector is a 2-D array of any type for which @code{size (@var{x})} returns @w{@code{[1, N]}} with non-negative N. @seealso{iscolumn, isscalar, isvector, ismatrix, size} @end deftypefn */) @@ -4001,8 +4001,8 @@ @deftypefn {} {@var{tf} =} iscolumn (@var{x}) Return true if @var{x} is a column vector. -A column vector is a 2-D object for which @code{size (@var{x})} returns -@w{@code{[N, 1]}} with non-negative N. +A column vector is a 2-D array of any type for which @code{size (@var{x})} +returns @w{@code{[N, 1]}} with non-negative N. @seealso{isrow, isscalar, isvector, ismatrix, size} @end deftypefn */) { @@ -4050,7 +4050,7 @@ @deftypefn {} {@var{tf} =} ismatrix (@var{x}) Return true if @var{x} is a 2-D array. -A matrix is an object with two dimensions (@code{ndims (@var{x}) == 2}) for +A matrix is an array of any type where @code{ndims (@var{x}) == 2} and for which @code{size (@var{x})} returns @w{@code{[M, N]}} with non-negative M and N. @seealso{isscalar, isvector, iscell, isstruct, issparse, isa} @@ -4099,8 +4099,8 @@ @deftypefn {} {@var{tf} =} issquare (@var{x}) Return true if @var{x} is a 2-D square array. -A square array is a 2-D object for which @code{size (@var{x})} returns -@w{@code{[N, N]}} where N is a non-negative integer. +A square array is a 2-D array of any type for which @code{size (@var{x})} +returns @w{@code{[N, N]}} where N is a non-negative integer. @seealso{isscalar, isvector, ismatrix, size} @end deftypefn */) {
--- a/libinterp/corefcn/gl2ps-print.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/corefcn/gl2ps-print.cc Fri Feb 16 14:56:20 2024 -0500 @@ -404,7 +404,7 @@ if (! tmpf) error ("gl2ps_renderer::draw: couldn't open temporary file for printing"); - frame.add ([=] () { std::fclose (tmpf); }); + frame.add ([tmpf] () { std::fclose (tmpf); }); // Reset buffsize, unless this is 2nd pass of a texstandalone print. if (m_term.find ("tex") == std::string::npos) @@ -1621,7 +1621,7 @@ error (R"(print: failed to open pipe "%s")", stream.c_str ()); // Need octave:: qualifier here to avoid ambiguity. - frame.add ([=] () { octave::pclose (m_fp); }); + frame.add ([m_fp] () { octave::pclose (m_fp); }); } else { @@ -1632,7 +1632,7 @@ if (! m_fp) error (R"(gl2ps_print: failed to create file "%s")", stream.c_str ()); - frame.add ([=] () { std::fclose (m_fp); }); + frame.add ([m_fp] () { std::fclose (m_fp); }); } gl2ps_renderer rend (glfcns, m_fp, term);
--- a/libinterp/corefcn/graphics.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/corefcn/graphics.cc Fri Feb 16 14:56:20 2024 -0500 @@ -2190,7 +2190,7 @@ // their handlevisibility property set to "callback" to be visible. octave::unwind_action executing_callbacks_cleanup - ([=] () { executing_callbacks.erase (this); }); + ([this] () { executing_callbacks.erase (this); }); if (! executing_callbacks.contains (this)) {
--- a/libinterp/corefcn/input.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/corefcn/input.cc Fri Feb 16 14:56:20 2024 -0500 @@ -1107,7 +1107,7 @@ "converting from codepage '%s' to UTF-8: %s", encoding.c_str (), std::strerror (errno)); - unwind_action free_utf8_str ([=] () { ::free (utf8_str); }); + unwind_action free_utf8_str ([utf8_str] () { ::free (utf8_str); }); src_str = std::string (reinterpret_cast<char *> (utf8_str), length); }
--- a/libinterp/corefcn/interpreter.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/corefcn/interpreter.cc Fri Feb 16 14:56:20 2024 -0500 @@ -705,8 +705,7 @@ unwind_action restore_add_hook (&load_path::set_add_hook, &m_load_path, m_load_path.get_add_hook ()); - m_load_path.set_add_hook ([=] (const std::string& dir) - { this->execute_pkg_add (dir); }); + m_load_path.set_add_hook ([this] (const std::string& dir) { this->execute_pkg_add (dir); }); m_load_path.initialize (set_initial_path);
--- a/libinterp/corefcn/load-path.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/corefcn/load-path.cc Fri Feb 16 14:56:20 2024 -0500 @@ -245,8 +245,8 @@ load_path::abs_dir_cache_type load_path::s_abs_dir_cache; load_path::load_path (interpreter& interp) - : m_add_hook ([=] (const std::string& dir) { this->execute_pkg_add (dir); }), -m_remove_hook ([=] (const std::string& dir) { this->execute_pkg_del (dir); }), + : m_add_hook ([this] (const std::string& dir) { this->execute_pkg_add (dir); }), +m_remove_hook ([this] (const std::string& dir) { this->execute_pkg_del (dir); }), m_interpreter (interp), m_package_map (), m_top_level_package (), m_dir_info_list (), m_init_dirs (), m_command_line_path () { }
--- a/libinterp/corefcn/mex.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/corefcn/mex.cc Fri Feb 16 14:56:20 2024 -0500 @@ -1940,7 +1940,7 @@ if (current_mx_memory_resource == &the_mx_deleting_memory_resource) { - octave::unwind_action act ([=] () { maybe_disown_ptr (m_pr); }); + octave::unwind_action act ([this] () { maybe_disown_ptr (m_pr); }); return octave_value (Array<ELT_T> (ppr, dv, current_mx_memory_resource)); } @@ -2392,7 +2392,7 @@ if (current_mx_memory_resource == &the_mx_deleting_memory_resource) { - octave::unwind_action act ([=] () + octave::unwind_action act ([this] () { maybe_disown_ptr (m_pr); maybe_disown_ptr (m_ir);
--- a/libinterp/corefcn/pr-output.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/corefcn/pr-output.cc Fri Feb 16 14:56:20 2024 -0500 @@ -3605,7 +3605,7 @@ frame.protect_var (Vcompact_format); frame.protect_var (uppercase_format); int prec = output_precision (); - frame.add ([=] () { set_output_prec (prec); }); + frame.add ([prec] () { set_output_prec (prec); }); format = format_string; // Initialize with existing value while (argc-- > 0)
--- a/libinterp/corefcn/strfns.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/corefcn/strfns.cc Fri Feb 16 14:56:20 2024 -0500 @@ -908,7 +908,7 @@ codepage, std::strerror (errno)); } - unwind_action free_utf8_str ([=] () { ::free (utf8_str); }); + unwind_action free_utf8_str ([utf8_str] () { ::free (utf8_str); }); octave_idx_type len = length; @@ -953,7 +953,7 @@ codepage, std::strerror (errno)); } - unwind_action free_native_bytes ([=] () { ::free (native_bytes); }); + unwind_action free_native_bytes ([native_bytes] () { ::free (native_bytes); }); octave_idx_type len = length;
--- a/libinterp/corefcn/sysdep.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/corefcn/sysdep.cc Fri Feb 16 14:56:20 2024 -0500 @@ -907,7 +907,7 @@ if (result != ERROR_SUCCESS) return result; - unwind_action restore_keys ([=] () { reg_close_key_wrapper (h_subkey); }); + unwind_action restore_keys ([] () { reg_close_key_wrapper (h_subkey); }); std::wstring wname = sys::u8_to_wstring (name); DWORD length = 0;
--- a/libinterp/dldfcn/__delaunayn__.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/dldfcn/__delaunayn__.cc Fri Feb 16 14:56:20 2024 -0500 @@ -174,7 +174,7 @@ if (! errfile) error ("__delaunayn__: unable to redirect Qhull errors to /dev/null"); - unwind_action close_errfile ([=] () { std::fclose (errfile); }); + unwind_action close_errfile ([errfile] () { std::fclose (errfile); }); qhT context = { }; qhT *qh = &context;
--- a/libinterp/dldfcn/audiodevinfo.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/dldfcn/audiodevinfo.cc Fri Feb 16 14:56:20 2024 -0500 @@ -1136,7 +1136,7 @@ start = get_sample_number (); end = get_end_sample (); - unwind_action stop_audioplayer ([=] () { stop (); }); + unwind_action stop_audioplayer ([this] () { stop (); }); for (unsigned int i = start; i < end; i += buffer_size) { @@ -1816,7 +1816,7 @@ unsigned int frames = seconds * get_fs (); - unwind_action stop_audiorecorder ([=] () { stop (); }); + unwind_action stop_audiorecorder ([this] () { stop (); }); for (unsigned int i = 0; i < frames; i += buffer_size) {
--- a/libinterp/dldfcn/audioread.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/dldfcn/audioread.cc Fri Feb 16 14:56:20 2024 -0500 @@ -90,7 +90,7 @@ error ("audioread: failed to open input file '%s': %s", filename.c_str (), sf_strerror (file)); - unwind_action close_open_file ([=] () { sf_close (file); }); + unwind_action close_open_file ([file] () { sf_close (file); }); // FIXME: It would be nicer to use a C++ expandable data container and // read a file of unknown length into memory in chunks and determine the @@ -441,7 +441,7 @@ error ("audiowrite: failed to open output file '%s': %s", filename.c_str (), sf_strerror (file)); - unwind_action close_open_file ([=] () { sf_close (file); }); + unwind_action close_open_file ([file] () { sf_close (file); }); sf_command (file, SFC_SET_NORM_DOUBLE, nullptr, SF_TRUE); sf_command (file, SFC_SET_CLIPPING, nullptr, SF_TRUE) ; @@ -644,7 +644,7 @@ error ("audioinfo: failed to open input file '%s': %s", filename.c_str (), sf_strerror (file)); - unwind_action close_open_file ([=] () { sf_close (file); }); + unwind_action close_open_file ([file] () { sf_close (file); }); octave_scalar_map result;
--- a/libinterp/octave-value/ov-null-mat.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/octave-value/ov-null-mat.cc Fri Feb 16 14:56:20 2024 -0500 @@ -101,7 +101,7 @@ DEFUN (isnull, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{tf} =} isnull (@var{x}) -Return true if @var{x} is a special null matrix, string, or single quoted +Return true if @var{x} is a special null array, string, or single quoted string. Indexed assignment with such a null value on the right-hand side should delete
--- a/libinterp/parse-tree/oct-parse.yy Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/parse-tree/oct-parse.yy Fri Feb 16 14:56:20 2024 -0500 @@ -5827,7 +5827,7 @@ return octave_value (); } - unwind_action act ([=] () { ::fclose (ffile); }); + unwind_action act ([ffile] () { ::fclose (ffile); }); // get the encoding for this folder input_system& input_sys = interp.get_input_system (); @@ -6659,7 +6659,7 @@ // the eval, then the message is stored in the exception object and we // will display it later, after the buffers have been restored. - unwind_action act ([=] () + unwind_action act ([old_out_buf, old_err_buf] () { octave_stdout.rdbuf (old_out_buf); std::cerr.rdbuf (old_err_buf);
--- a/libinterp/parse-tree/pt-eval.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/libinterp/parse-tree/pt-eval.cc Fri Feb 16 14:56:20 2024 -0500 @@ -660,7 +660,7 @@ exiting = false; evmgr.post_event - ([&] (interpreter& interp) + ([this, input, &mtx, &incomplete_parse, &evaluation_pending, &cv, &exiting] (interpreter& interp) { // INTERPRETER THREAD @@ -679,14 +679,14 @@ } catch (const execution_exception& ee) { - error_system& es = m_interpreter.get_error_system (); + error_system& es = interp.get_error_system (); es.save_exception (ee); es.display_exception (ee); - if (m_interpreter.interactive ()) + if (interp.interactive ()) { - m_interpreter.recover_from_exception (); + interp.recover_from_exception (); m_parser->reset (); evaluation_pending = false; cv.notify_all (); @@ -712,7 +712,7 @@ // Wait until evaluation is finished before prompting for input // again. - cv.wait (lock, [&] { return ! evaluation_pending; }); + cv.wait (lock, [&evaluation_pending] { return ! evaluation_pending; }); if (exiting) break; @@ -1162,7 +1162,7 @@ const std::string& try_code, int nargout) { - unwind_action act ([=] (std::size_t frm) + unwind_action act ([this] (std::size_t frm) { m_call_stack.restore_frame (frm); }, m_call_stack.current_frame ()); @@ -1187,7 +1187,7 @@ { octave_value_list retval; - unwind_action act1 ([=] (std::size_t frm) + unwind_action act1 ([this] (std::size_t frm) { m_call_stack.restore_frame (frm); }, m_call_stack.current_frame ()); @@ -1421,7 +1421,7 @@ m_debugger_stack.push (dbgr); - frame.add ([=] () + frame.add ([this] () { delete m_debugger_stack.top (); m_debugger_stack.pop (); @@ -2009,7 +2009,7 @@ // by getting a reference to the caller or base stack frame and // calling assign on that? - unwind_action act ([=] (std::size_t frm) + unwind_action act ([this] (std::size_t frm) { m_call_stack.restore_frame (frm); }, m_call_stack.current_frame ()); @@ -5175,7 +5175,7 @@ // evaluate the partial expression that the special "end" // token applies to in the calling stack frame. - unwind_action act ([=] (std::size_t frm) + unwind_action act ([this] (std::size_t frm) { m_call_stack.restore_frame (frm); }, m_call_stack.current_frame ());
--- a/liboctave/array/Array-util.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/liboctave/array/Array-util.cc Fri Feb 16 14:56:20 2024 -0500 @@ -577,13 +577,7 @@ octave_idx_type *idx_vec = idx.rwdata (); if (i < len - 1) - { - octave_idx_type n = dvx(i); - - idxa(i).loop (clen, [=, &idx_vec] (octave_idx_type k) { - (*idx_vec++ *= n) += k; - }); - } + idxa(i).loop (clen, [n = dvx(i), &idx_vec] (octave_idx_type k) { (*idx_vec++ *= n) += k; }); else idxa(i).copy_data (idx_vec); }
--- a/liboctave/array/Range.h Wed Feb 14 18:52:17 2024 -0500 +++ b/liboctave/array/Range.h Fri Feb 16 14:56:20 2024 -0500 @@ -251,7 +251,7 @@ T *array = retval.rwdata (); - idx.loop (n, [=, &array] (octave_idx_type i) + idx.loop (n, [this, &array] (octave_idx_type i) { if (i == 0) // Required for proper NaN handling.
--- a/liboctave/system/lo-sysdep.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/liboctave/system/lo-sysdep.cc Fri Feb 16 14:56:20 2024 -0500 @@ -239,7 +239,7 @@ return false; } - unwind_action act ([=] () + unwind_action act ([] () { std::fclose (fptr); sys::unlink (tmpname);
--- a/liboctave/util/lo-regexp.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/liboctave/util/lo-regexp.cc Fri Feb 16 14:56:20 2024 -0500 @@ -368,16 +368,15 @@ octave_quit (); #if defined (HAVE_PCRE2) - pcre2_match_data *m_data + pcre2_match_data *tmp_match_data = pcre2_match_data_create_from_pattern (re, nullptr); - unwind_action cleanup_match_data - ([=] () { pcre2_match_data_free (m_data); }); + unwind_action cleanup_match_data ([tmp_match_data] () { pcre2_match_data_free (tmp_match_data); }); int matches = pcre2_match (re, reinterpret_cast<PCRE2_SPTR> (buffer.c_str ()), buffer.length (), idx, PCRE2_NO_UTF_CHECK | (idx ? PCRE2_NOTBOL : 0), - m_data, nullptr); + tmp_match_data, nullptr); if (matches < 0 && matches != PCRE2_ERROR_NOMATCH) (*current_liboctave_error_handler) @@ -387,7 +386,7 @@ if (matches == PCRE2_ERROR_NOMATCH) break; - OCTAVE_PCRE_SIZE *ovector = pcre2_get_ovector_pointer (m_data); + OCTAVE_PCRE_SIZE *ovector = pcre2_get_ovector_pointer (tmp_match_data); #else int matches = pcre_exec (re, nullptr, buffer.c_str (), buffer.length (), idx,
--- a/liboctave/util/oct-glob.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/liboctave/util/oct-glob.cc Fri Feb 16 14:56:20 2024 -0500 @@ -81,7 +81,7 @@ void *glob_info = octave_create_glob_info_struct (); unwind_action cleanup_glob_info_struct - ([=] () { octave_destroy_glob_info_struct (glob_info); }); + ([glob_info] () { octave_destroy_glob_info_struct (glob_info); }); for (int i = 0; i < npat; i++) { @@ -184,7 +184,7 @@ if (h_find == INVALID_HANDLE_VALUE) return; - unwind_action close_h_find ([=] () { FindClose (h_find); }); + unwind_action close_h_find ([] () { FindClose (h_find); }); // find all files that match pattern do @@ -311,8 +311,7 @@ void *glob_info = octave_create_glob_info_struct (); - unwind_action cleanup_glob_info_struct - ([=] () { octave_destroy_glob_info_struct (glob_info); }); + unwind_action cleanup_glob_info_struct ([glob_info] () { octave_destroy_glob_info_struct (glob_info); }); for (int i = 0; i < npat; i++) {
--- a/liboctave/util/oct-string.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/liboctave/util/oct-string.cc Fri Feb 16 14:56:20 2024 -0500 @@ -521,7 +521,7 @@ who.c_str (), encoding.c_str (), std::strerror (errno)); } - octave::unwind_action free_native_str ([=] () { ::free (native_str); }); + octave::unwind_action free_native_str ([native_str] () { ::free (native_str); }); std::string retval = std::string (native_str, length); @@ -551,7 +551,7 @@ who.c_str (), encoding.c_str (), std::strerror (errno)); } - octave::unwind_action free_utf8_str ([=] () { ::free (utf8_str); }); + octave::unwind_action free_utf8_str ([utf8_str] () { ::free (utf8_str); }); std::string retval = std::string (reinterpret_cast<char *> (utf8_str), length); @@ -597,8 +597,7 @@ ("%s: converting from codepage '%s' to UTF-8 failed: %s", who.c_str (), fallback.c_str (), std::strerror (errno)); - octave::unwind_action free_val_utf8 - ([=] () { ::free (val_utf8); }); + octave::unwind_action free_val_utf8 ([val_utf8] () { ::free (val_utf8); }); out_str.append (reinterpret_cast<const char *> (val_utf8), lengthp); @@ -635,7 +634,7 @@ who.c_str (), encoding.c_str (), std::strerror (errno)); } - octave::unwind_action free_native_str ([=] () { ::free (native_str); }); + octave::unwind_action free_native_str ([native_str] () { ::free (native_str); }); std::string retval = std::string (native_str, length);
--- a/liboctave/util/url-transfer.cc Wed Feb 14 18:52:17 2024 -0500 +++ b/liboctave/util/url-transfer.cc Fri Feb 16 14:56:20 2024 -0500 @@ -349,7 +349,7 @@ SETOPT (CURLOPT_HTTPGET, 1); } - OCTAVE_DISABLE_COPY_MOVE (curl_transfer); + OCTAVE_DISABLE_COPY_MOVE (curl_transfer) ~curl_transfer () { @@ -425,7 +425,7 @@ { struct curl_slist *slist = nullptr; - unwind_action cleanup_slist ([=] () { curl_slist_free_all (slist); }); + unwind_action cleanup_slist ([slist] () { curl_slist_free_all (slist); }); std::string cmd = "rnfr " + oldname; slist = curl_slist_append (slist, cmd.c_str ()); @@ -597,7 +597,7 @@ struct curl_slist *slist = nullptr; - unwind_action cleanup_slist ([=] () { curl_slist_free_all (slist); }); + unwind_action cleanup_slist ([slist] () { curl_slist_free_all (slist); }); slist = curl_slist_append (slist, "pwd"); SETOPTR (CURLOPT_POSTQUOTE, slist); @@ -688,7 +688,7 @@ { struct curl_slist *slist = nullptr; - unwind_action cleanup_slist ([=] () { curl_slist_free_all (slist); }); + unwind_action cleanup_slist ([slist] () { curl_slist_free_all (slist); }); if (param.numel () >= 2) { @@ -715,7 +715,7 @@ SETOPT (CURLOPT_URL, m_host_or_url.c_str ()); - unwind_action cleanup_mime ([=] () { curl_mime_free (mime); }); + unwind_action cleanup_mime ([mime] () { curl_mime_free (mime); }); if (param.numel () >= 2) { @@ -890,7 +890,7 @@ { struct curl_slist *slist = nullptr; - unwind_action cleanup_slist ([=] () { curl_slist_free_all (slist); }); + unwind_action cleanup_slist ([slist] () { curl_slist_free_all (slist); }); std::string cmd = action + ' ' + file_or_dir;
--- a/scripts/linear-algebra/isbanded.m Wed Feb 14 18:52:17 2024 -0500 +++ b/scripts/linear-algebra/isbanded.m Fri Feb 16 14:56:20 2024 -0500 @@ -25,7 +25,7 @@ ## -*- texinfo -*- ## @deftypefn {} {@var{tf} =} isbanded (@var{A}, @var{lower}, @var{upper}) -## Return true if @var{A} is a matrix with entries confined between +## Return true if @var{A} is a numeric matrix with entries confined between ## @var{lower} diagonals below the main diagonal and @var{upper} diagonals ## above the main diagonal. ##
--- a/scripts/linear-algebra/isdefinite.m Wed Feb 14 18:52:17 2024 -0500 +++ b/scripts/linear-algebra/isdefinite.m Fri Feb 16 14:56:20 2024 -0500 @@ -26,8 +26,8 @@ ## -*- texinfo -*- ## @deftypefn {} {@var{tf} =} isdefinite (@var{A}) ## @deftypefnx {} {@var{tf} =} isdefinite (@var{A}, @var{tol}) -## Return true if @var{A} is symmetric positive definite matrix within the -## tolerance specified by @var{tol}. +## Return true if @var{A} is symmetric positive definite numeric matrix within +## the tolerance specified by @var{tol}. ## ## If @var{tol} is omitted, use a tolerance of ## @code{100 * eps * norm (@var{A}, "fro")}.
--- a/scripts/linear-algebra/isdiag.m Wed Feb 14 18:52:17 2024 -0500 +++ b/scripts/linear-algebra/isdiag.m Fri Feb 16 14:56:20 2024 -0500 @@ -25,7 +25,8 @@ ## -*- texinfo -*- ## @deftypefn {} {@var{tf} =} isdiag (@var{A}) -## Return true if @var{A} is a diagonal matrix. +## Return true if @var{A} is a diagonal numeric matrix which is defined as a +## 2-D array where all elements above and below the main diagonal are zero. ## @seealso{isbanded, istril, istriu, diag, bandwidth} ## @end deftypefn
--- a/scripts/linear-algebra/ishermitian.m Wed Feb 14 18:52:17 2024 -0500 +++ b/scripts/linear-algebra/ishermitian.m Fri Feb 16 14:56:20 2024 -0500 @@ -28,8 +28,8 @@ ## @deftypefnx {} {@var{tf} =} ishermitian (@var{A}, @var{tol}) ## @deftypefnx {} {@var{tf} =} ishermitian (@var{A}, @qcode{"skew"}) ## @deftypefnx {} {@var{tf} =} ishermitian (@var{A}, @qcode{"skew"}, @var{tol}) -## Return true if @var{A} is a Hermitian or skew-Hermitian matrix within the -## tolerance specified by @var{tol}. +## Return true if @var{A} is a Hermitian or skew-Hermitian numeric matrix +## within the tolerance specified by @var{tol}. ## ## The default tolerance is zero (uses faster code). ##
--- a/scripts/linear-algebra/issymmetric.m Wed Feb 14 18:52:17 2024 -0500 +++ b/scripts/linear-algebra/issymmetric.m Fri Feb 16 14:56:20 2024 -0500 @@ -28,8 +28,8 @@ ## @deftypefnx {} {@var{tf} =} issymmetric (@var{A}, @var{tol}) ## @deftypefnx {} {@var{tf} =} issymmetric (@var{A}, @qcode{"skew"}) ## @deftypefnx {} {@var{tf} =} issymmetric (@var{A}, @qcode{"skew"}, @var{tol}) -## Return true if @var{A} is a symmetric or skew-symmetric matrix within the -## tolerance specified by @var{tol}. +## Return true if @var{A} is a symmetric or skew-symmetric numeric matrix +## within the tolerance specified by @var{tol}. ## ## The default tolerance is zero (uses faster code). ##
--- a/scripts/linear-algebra/istril.m Wed Feb 14 18:52:17 2024 -0500 +++ b/scripts/linear-algebra/istril.m Fri Feb 16 14:56:20 2024 -0500 @@ -25,7 +25,7 @@ ## -*- texinfo -*- ## @deftypefn {} {@var{tf} =} istril (@var{A}) -## Return true if @var{A} is a lower triangular matrix. +## Return true if @var{A} is a lower triangular numeric matrix. ## ## A lower triangular matrix has nonzero entries only on the main diagonal and ## below.
--- a/scripts/linear-algebra/istriu.m Wed Feb 14 18:52:17 2024 -0500 +++ b/scripts/linear-algebra/istriu.m Fri Feb 16 14:56:20 2024 -0500 @@ -25,7 +25,7 @@ ## -*- texinfo -*- ## @deftypefn {} {@var{tf} =} istriu (@var{A}) -## Return true if @var{A} is an upper triangular matrix. +## Return true if @var{A} is an upper triangular numeric matrix. ## ## An upper triangular matrix has nonzero entries only on the main diagonal and ## above.
--- a/scripts/plot/util/hdl2struct.m Wed Feb 14 18:52:17 2024 -0500 +++ b/scripts/plot/util/hdl2struct.m Fri Feb 16 14:56:20 2024 -0500 @@ -51,7 +51,7 @@ s.special = []; ## Process, in reverse order, all children except for - ## legends, colorbars, uimenu, and hggroup children + ## legends, colorbars, uimenu, and hggroup children. ii = 0; allkids = get (h, "children"); if (! strcmp (s.type, "hggroup")) @@ -71,7 +71,7 @@ endif ## Add non "children" children objects (title, xlabel, ...) and - ## hggroup children and tag them in "special" + ## hggroup children and tag them in "special". if (strcmp (s.type, "hggroup")) special = allkids; else @@ -86,9 +86,10 @@ nsp -= 1; endwhile - if (strcmp (s.type, "axes") && isempty (get (h, "tag"))) - ## look for legends and colorbars among axes brothers and add them - ## to the children list + if (strcmp (s.type, "axes") ... + && ! any (strcmp (get (h, "tag"), {'colorbar', 'legend'}))) + ## Look for legends and colorbars among axes brothers and add them + ## to the children list. try lg = get (h, "__legend_handle__"); catch @@ -145,13 +146,8 @@ persistent excluded; if (isempty (excluded)) - excluded = cell2struct (repmat ({[]}, 1, 17), - {"beingdeleted", "busyaction", "buttondownfcn", ... - "children", "clipping", "contextmenu", ... - "createfcn", "deletefcn", "handlevisibility", ... - "hittest", "interruptible", "parent", ... - "selected" , "selectionhighlight", ... - "selectedobject", "type", "uicontextmenu"}, 2); + excluded = cell2struct (repmat ({[]}, 1, 4), + {"beingdeleted", "children", "parent", "type"}, 2); endif obj = get (h); @@ -173,6 +169,7 @@ endfunction + ## FIXME: need validation tests ## FIXME: Need to test code for legends, colorbars.