Mercurial > octave
changeset 23459:ddcbf10c8c39
maint: Use C++11 nullptr rather than 0 or NULL for remaining instances in code.
* sysdep.cc, __osmesa_print__.cc, audioread.cc,
ov-java.cc: Use C++11 nullptr rather than 0 or NULL.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 28 Apr 2017 17:20:13 -0700 |
parents | 0f4ed33886de |
children | b605146ed2ed |
files | libinterp/corefcn/sysdep.cc libinterp/dldfcn/__osmesa_print__.cc libinterp/dldfcn/audioread.cc libinterp/octave-value/ov-java.cc |
diffstat | 4 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/sysdep.cc Fri Apr 28 16:40:17 2017 -0400 +++ b/libinterp/corefcn/sysdep.cc Fri Apr 28 17:20:13 2017 -0700 @@ -185,7 +185,7 @@ HMODULE hShell = LoadLibrary ("shell32.dll"); - if (hShell != NULL) + if (hShell) { SETCURRENTAPPID pfnSetCurrentProcessExplicitAppUserModelID = reinterpret_cast<SETCURRENTAPPID> (GetProcAddress (hShell,
--- a/libinterp/dldfcn/__osmesa_print__.cc Fri Apr 28 16:40:17 2017 -0400 +++ b/libinterp/dldfcn/__osmesa_print__.cc Fri Apr 28 17:20:13 2017 -0700 @@ -123,7 +123,7 @@ GLsizei Height = static_cast<GLsizei> (bb(3)); // Create an RGBA-mode context, specify Z=16, stencil=0, accum=0 sizes - OSMesaContext ctx = OSMesaCreateContextExt (OSMESA_RGBA, 16, 0, 0, NULL); + OSMesaContext ctx = OSMesaCreateContextExt (OSMESA_RGBA, 16, 0, 0, nullptr); if (! ctx) error ("__osmesa_print__: OSMesaCreateContext failed!\n");
--- a/libinterp/dldfcn/audioread.cc Fri Apr 28 16:40:17 2017 -0400 +++ b/libinterp/dldfcn/audioread.cc Fri Apr 28 17:20:13 2017 -0700 @@ -523,13 +523,13 @@ audio_sub_formats (int format) { int count; - sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &count, sizeof (int)); + sf_command (nullptr, SFC_GET_FORMAT_SUBTYPE_COUNT, &count, sizeof (int)); for (int i = 0; i < count; i++) { SF_FORMAT_INFO info; info.format = i; - sf_command (NULL, SFC_GET_FORMAT_SUBTYPE, &info, sizeof (info)); + sf_command (nullptr, SFC_GET_FORMAT_SUBTYPE, &info, sizeof (info)); SF_INFO sfinfo; memset (&sfinfo, 0, sizeof (sfinfo)); @@ -566,13 +566,13 @@ } int count; - sf_command (NULL, SFC_GET_FORMAT_MAJOR_COUNT, &count, sizeof (int)); + sf_command (nullptr, SFC_GET_FORMAT_MAJOR_COUNT, &count, sizeof (int)); for (int i = 0; i < count; i++) { SF_FORMAT_INFO info; info.format = i; - sf_command (NULL, SFC_GET_FORMAT_MAJOR, &info, sizeof (info)); + sf_command (nullptr, SFC_GET_FORMAT_MAJOR, &info, sizeof (info)); bool match = true; if (! search.empty ())
--- a/libinterp/octave-value/ov-java.cc Fri Apr 28 16:40:17 2017 -0400 +++ b/libinterp/octave-value/ov-java.cc Fri Apr 28 17:20:13 2017 -0700 @@ -1509,7 +1509,7 @@ const octave_idx_type n = str_arr.numel (); jclass_ref scls (jni_env, jni_env->FindClass ("java/lang/String")); - jobjectArray array = jni_env->NewObjectArray (n, scls, NULL); + jobjectArray array = jni_env->NewObjectArray (n, scls, nullptr); for (octave_idx_type i = 0; i < n; i++) {