*: use nullptr instead of NULL

This commit is contained in:
Max Kellermann
2013-10-28 23:58:17 +01:00
parent 4728735acf
commit 20597b3632
47 changed files with 250 additions and 249 deletions

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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)