diff options
author | Max Kellermann <max@musicpd.org> | 2020-02-01 13:49:19 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-02-01 14:02:43 +0100 |
commit | 4f22f4d357c99ba4163a496882f813138db3c39b (patch) | |
tree | dd1d76658ca8466f1cbb220d49bd8e728aeb9df1 /test | |
parent | 4c52001a350ca573fd19f910f2f808d5f31cf95b (diff) |
*: use nullptr instead of NULL
Diffstat (limited to 'test')
-rw-r--r-- | test/DumpDatabase.cxx | 2 | ||||
-rw-r--r-- | test/dump_playlist.cxx | 6 | ||||
-rw-r--r-- | test/dump_rva2.cxx | 2 | ||||
-rw-r--r-- | test/read_mixer.cxx | 2 | ||||
-rw-r--r-- | test/read_tags.cxx | 4 | ||||
-rw-r--r-- | test/run_encoder.cxx | 2 | ||||
-rw-r--r-- | test/run_filter.cxx | 2 | ||||
-rw-r--r-- | test/test_vorbis_encoder.cxx | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx index 827e04f41..402aa31fe 100644 --- a/test/DumpDatabase.cxx +++ b/test/DumpDatabase.cxx @@ -110,7 +110,7 @@ try { const char *const plugin_name = argv[2]; const DatabasePlugin *plugin = GetDatabasePluginByName(plugin_name); - if (plugin == NULL) { + if (plugin == nullptr) { cerr << "No such database plugin: " << plugin_name << endl; return EXIT_FAILURE; } diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx index 9359013d9..34892a557 100644 --- a/test/dump_playlist.cxx +++ b/test/dump_playlist.cxx @@ -74,7 +74,7 @@ try { InputStreamPtr is; auto playlist = playlist_list_open_uri(uri, mutex); - if (playlist == NULL) { + if (playlist == nullptr) { /* open the stream and wait until it becomes ready */ is = InputStream::OpenReady(uri, mutex); @@ -82,7 +82,7 @@ try { /* open the playlist */ playlist = playlist_list_open_stream(std::move(is), uri); - if (playlist == NULL) { + if (playlist == nullptr) { fprintf(stderr, "Failed to open playlist\n"); return 2; } @@ -91,7 +91,7 @@ try { /* dump the playlist */ std::unique_ptr<DetachedSong> song; - while ((song = playlist->NextSong()) != NULL) { + while ((song = playlist->NextSong()) != nullptr) { printf("%s\n", song->GetURI()); const unsigned start_ms = song->GetStartTime().ToMS(); diff --git a/test/dump_rva2.cxx b/test/dump_rva2.cxx index 318f38d80..bd09edab2 100644 --- a/test/dump_rva2.cxx +++ b/test/dump_rva2.cxx @@ -70,7 +70,7 @@ try { auto is = OpenLocalInputStream(path, mutex); const auto tag = tag_id3_load(*is); - if (tag == NULL) { + if (tag == nullptr) { fprintf(stderr, "No ID3 tag found\n"); return EXIT_FAILURE; } diff --git a/test/read_mixer.cxx b/test/read_mixer.cxx index d68e62640..9823cef8d 100644 --- a/test/read_mixer.cxx +++ b/test/read_mixer.cxx @@ -32,7 +32,7 @@ const FilterPlugin * filter_plugin_by_name(gcc_unused const char *name) noexcept { assert(false); - return NULL; + return nullptr; } int main(int argc, gcc_unused char **argv) diff --git a/test/read_tags.cxx b/test/read_tags.cxx index 567ad6735..5ddaf038a 100644 --- a/test/read_tags.cxx +++ b/test/read_tags.cxx @@ -108,7 +108,7 @@ try { const ScopeDecoderPluginsInit decoder_plugins_init({}); plugin = decoder_plugin_from_name(decoder_name); - if (plugin == NULL) { + if (plugin == nullptr) { fprintf(stderr, "No such decoder: %s\n", decoder_name); return EXIT_FAILURE; } @@ -125,7 +125,7 @@ try { Mutex mutex; InputStreamPtr is; - if (!success && plugin->scan_stream != NULL) { + if (!success && plugin->scan_stream != nullptr) { is = InputStream::OpenReady(path.c_str(), mutex); success = plugin->ScanStream(*is, h); } diff --git a/test/run_encoder.cxx b/test/run_encoder.cxx index ca7774201..ed4c7f7f3 100644 --- a/test/run_encoder.cxx +++ b/test/run_encoder.cxx @@ -55,7 +55,7 @@ try { /* create the encoder */ const auto plugin = encoder_plugin_get(encoder_name); - if (plugin == NULL) { + if (plugin == nullptr) { fprintf(stderr, "No such encoder: %s\n", encoder_name); return EXIT_FAILURE; } diff --git a/test/run_filter.cxx b/test/run_filter.cxx index 213f8f70c..b5b75dc56 100644 --- a/test/run_filter.cxx +++ b/test/run_filter.cxx @@ -52,7 +52,7 @@ LoadFilter(const ConfigData &config, const char *name) { const auto *param = config.FindBlock(ConfigBlockOption::AUDIO_FILTER, "name", name); - if (param == NULL) + if (param == nullptr) throw FormatRuntimeError("No such configured filter: %s", name); diff --git a/test/test_vorbis_encoder.cxx b/test/test_vorbis_encoder.cxx index caad06904..69f1c61da 100644 --- a/test/test_vorbis_encoder.cxx +++ b/test/test_vorbis_encoder.cxx @@ -41,7 +41,7 @@ try { /* create the encoder */ const auto plugin = encoder_plugin_get("vorbis"); - assert(plugin != NULL); + assert(plugin != nullptr); ConfigBlock block; block.AddBlockParam("quality", "5.0", -1); |