Mercurial > octave
changeset 31425:9f4a9dd4a6ee
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)".
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 13 Nov 2022 13:00:16 -0500 |
parents | d1165473e4b0 |
children | c7b2ad1e51f3 |
files | libgui/src/variable-editor.cc liboctave/util/lo-regexp.cc |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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<QDockWidget *> (name); - if (existing_qdw != NULL) + if (existing_qdw) { // Already open.
--- 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); });