diff options
author | Max Kellermann <max@duempel.org> | 2013-10-02 08:13:28 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-02 08:56:27 +0200 |
commit | 0214baad5affb78bf64c7774ba48693a3c6d15ee (patch) | |
tree | 79c8c8c13a443f60007db87f65bcbe44941586f3 /src/PlaylistMapper.cxx | |
parent | c2d3ed2acc9fdb9b0900b70d427d91b22684a8ec (diff) | |
download | mpd-0214baad5affb78bf64c7774ba48693a3c6d15ee.tar.gz mpd-0214baad5affb78bf64c7774ba48693a3c6d15ee.tar.xz mpd-0214baad5affb78bf64c7774ba48693a3c6d15ee.zip |
Playlist*: use nullptr instead of NULL
Diffstat (limited to '')
-rw-r--r-- | src/PlaylistMapper.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/PlaylistMapper.cxx b/src/PlaylistMapper.cxx index 559154a4e..18ddb0046 100644 --- a/src/PlaylistMapper.cxx +++ b/src/PlaylistMapper.cxx @@ -32,8 +32,8 @@ playlist_open_path(const char *path_fs, Mutex &mutex, Cond &cond, struct input_stream **is_r) { auto playlist = playlist_list_open_uri(path_fs, mutex, cond); - if (playlist != NULL) - *is_r = NULL; + if (playlist != nullptr) + *is_r = nullptr; else playlist = playlist_list_open_path(path_fs, mutex, cond, is_r); @@ -47,15 +47,14 @@ static SongEnumerator * playlist_open_in_playlist_dir(const char *uri, Mutex &mutex, Cond &cond, struct input_stream **is_r) { - char *path_fs; - assert(spl_valid_name(uri)); const Path &playlist_directory_fs = map_spl_path(); if (playlist_directory_fs.IsNull()) - return NULL; + return nullptr; - path_fs = g_build_filename(playlist_directory_fs.c_str(), uri, NULL); + char *path_fs = g_build_filename(playlist_directory_fs.c_str(), uri, + nullptr); auto playlist = playlist_open_path(path_fs, mutex, cond, is_r); g_free(path_fs); @@ -74,7 +73,7 @@ playlist_open_in_music_dir(const char *uri, Mutex &mutex, Cond &cond, Path path = map_uri_fs(uri); if (path.IsNull()) - return NULL; + return nullptr; return playlist_open_path(path.c_str(), mutex, cond, is_r); } @@ -86,16 +85,16 @@ playlist_mapper_open(const char *uri, Mutex &mutex, Cond &cond, if (spl_valid_name(uri)) { auto playlist = playlist_open_in_playlist_dir(uri, mutex, cond, is_r); - if (playlist != NULL) + if (playlist != nullptr) return playlist; } if (uri_safe_local(uri)) { auto playlist = playlist_open_in_music_dir(uri, mutex, cond, is_r); - if (playlist != NULL) + if (playlist != nullptr) return playlist; } - return NULL; + return nullptr; } |