diff options
author | Max Kellermann <max@duempel.org> | 2013-10-28 23:58:17 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-28 23:58:17 +0100 |
commit | 20597b3632d3b6e25ba532716106f90d5b64d0e8 (patch) | |
tree | fa6dabaff127150caf3cf4723257f15ef2c3e0f8 /src/input | |
parent | 4728735acf20fba24d0d03ab431160e250325869 (diff) | |
download | mpd-20597b3632d3b6e25ba532716106f90d5b64d0e8.tar.gz mpd-20597b3632d3b6e25ba532716106f90d5b64d0e8.tar.xz mpd-20597b3632d3b6e25ba532716106f90d5b64d0e8.zip |
*: use nullptr instead of NULL
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/ArchiveInputPlugin.cxx | 10 | ||||
-rw-r--r-- | src/input/DespotifyInputPlugin.cxx | 16 | ||||
-rw-r--r-- | src/input/RewindInputPlugin.cxx | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/input/ArchiveInputPlugin.cxx b/src/input/ArchiveInputPlugin.cxx index c5c881330..5288f2b3b 100644 --- a/src/input/ArchiveInputPlugin.cxx +++ b/src/input/ArchiveInputPlugin.cxx @@ -48,7 +48,7 @@ input_archive_open(const char *pathname, InputStream *is; if (!PathTraits::IsAbsoluteFS(pathname)) - return NULL; + return nullptr; char *pname = g_strdup(pathname); // archive_lookup will modify pname when true is returned @@ -57,7 +57,7 @@ input_archive_open(const char *pathname, FormatDebug(archive_domain, "not an archive, lookup %s failed", pname); g_free(pname); - return NULL; + return nullptr; } //check which archive plugin to use (by ext) @@ -66,13 +66,13 @@ input_archive_open(const char *pathname, FormatWarning(archive_domain, "can't handle archive %s", archive); g_free(pname); - return NULL; + return nullptr; } auto file = archive_file_open(arplug, archive, error); - if (file == NULL) { + if (file == nullptr) { g_free(pname); - return NULL; + return nullptr; } //setup fileops diff --git a/src/input/DespotifyInputPlugin.cxx b/src/input/DespotifyInputPlugin.cxx index 5476b41fd..b08299516 100644 --- a/src/input/DespotifyInputPlugin.cxx +++ b/src/input/DespotifyInputPlugin.cxx @@ -131,26 +131,26 @@ input_despotify_open(const char *url, struct ds_track *track; if (!g_str_has_prefix(url, "spt://")) - return NULL; + return nullptr; session = mpd_despotify_get_session(); if (!session) - return NULL; + return nullptr; ds_link = despotify_link_from_uri(url + 6); if (!ds_link) { FormatDebug(despotify_domain, "Can't find %s", url); - return NULL; + return nullptr; } if (ds_link->type != LINK_TYPE_TRACK) { despotify_free_link(ds_link); - return NULL; + return nullptr; } track = despotify_link_get_track(session, ds_link); despotify_free_link(ds_link); if (!track) - return NULL; + return nullptr; DespotifyInputStream *ctx = new DespotifyInputStream(url, mutex, cond, @@ -158,13 +158,13 @@ input_despotify_open(const char *url, if (!mpd_despotify_register_callback(callback, ctx)) { delete ctx; - return NULL; + return nullptr; } if (despotify_play(ctx->session, ctx->track, false) == false) { mpd_despotify_unregister_callback(callback); delete ctx; - return NULL; + return nullptr; } return &ctx->base; @@ -213,7 +213,7 @@ input_despotify_tag(InputStream *is) DespotifyInputStream *ctx = (DespotifyInputStream *)is; Tag *tag = ctx->tag; - ctx->tag = NULL; + ctx->tag = nullptr; return tag; } diff --git a/src/input/RewindInputPlugin.cxx b/src/input/RewindInputPlugin.cxx index 8d229c54f..e11f56631 100644 --- a/src/input/RewindInputPlugin.cxx +++ b/src/input/RewindInputPlugin.cxx @@ -240,7 +240,7 @@ const InputPlugin rewind_input_plugin = { InputStream * input_rewind_open(InputStream *is) { - assert(is != NULL); + assert(is != nullptr); assert(is->offset == 0); if (is->seekable) |