# HG changeset patch # User John W. Eaton # Date 1668362416 18000 # Node ID 9f4a9dd4a6ee34ddc6e8d0a87d0c703782af7358 # Parent d1165473e4b0a2f13b4ef4e64d157e6e32b0105d use nullptr instead of NULL, don't compare pointer to NULL in IF condition * lo-regexp.cc (regexp::compile_internal): Use nullptr instead of NULL in call to pcre2_match_data_create_from_pattern. * variable-editor.cc (variable_editor::edit_variable): Style fix: write "if (ptr)", not "if (ptr != NULL)". diff -r d1165473e4b0 -r 9f4a9dd4a6ee libgui/src/variable-editor.cc --- a/libgui/src/variable-editor.cc Sun Nov 13 10:17:17 2022 -0500 +++ b/libgui/src/variable-editor.cc Sun Nov 13 13:00:16 2022 -0500 @@ -1212,7 +1212,7 @@ } QDockWidget *existing_qdw = m_main->findChild (name); - if (existing_qdw != NULL) + if (existing_qdw) { // Already open. diff -r d1165473e4b0 -r 9f4a9dd4a6ee liboctave/util/lo-regexp.cc --- a/liboctave/util/lo-regexp.cc Sun Nov 13 10:17:17 2022 -0500 +++ b/liboctave/util/lo-regexp.cc Sun Nov 13 13:00:16 2022 -0500 @@ -369,7 +369,8 @@ octave_quit (); #if defined (HAVE_PCRE2) - pcre2_match_data *m_data = pcre2_match_data_create_from_pattern (re, NULL); + pcre2_match_data *m_data + = pcre2_match_data_create_from_pattern (re, nullptr); unwind_action cleanup_match_data ([=] () { pcre2_match_data_free (m_data); });