diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-17 12:17:41 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-01-17 12:17:41 +0100 |
commit | bbc5212436021cd76f173ce60d7f0d95411d3319 (patch) | |
tree | a6b517c25799913d4cf7f3b5fbc95d143a9a53e3 /src/Mapper.cxx | |
parent | c4f7740b800c49ad119e5d70335ea51a666e0114 (diff) |
fs/AllocatedPath: make the nullptr_t constructor public
Diffstat (limited to 'src/Mapper.cxx')
-rw-r--r-- | src/Mapper.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Mapper.cxx b/src/Mapper.cxx index 959e6836e..089469ea3 100644 --- a/src/Mapper.cxx +++ b/src/Mapper.cxx @@ -39,7 +39,7 @@ * The absolute path of the playlist directory encoded in the * filesystem character set. */ -static AllocatedPath playlist_dir_fs = AllocatedPath::Null(); +static AllocatedPath playlist_dir_fs = nullptr; static void mapper_set_playlist_dir(AllocatedPath &&path) @@ -72,15 +72,15 @@ map_uri_fs(const char *uri) noexcept assert(*uri != '/'); if (instance->storage == nullptr) - return AllocatedPath::Null(); + return nullptr; const auto music_dir_fs = instance->storage->MapFS(""); if (music_dir_fs.IsNull()) - return AllocatedPath::Null(); + return nullptr; const auto uri_fs = AllocatedPath::FromUTF8(uri); if (uri_fs.IsNull()) - return AllocatedPath::Null(); + return nullptr; return AllocatedPath::Build(music_dir_fs, uri_fs); } @@ -118,7 +118,7 @@ AllocatedPath map_spl_utf8_to_fs(const char *name) noexcept { if (playlist_dir_fs.IsNull()) - return AllocatedPath::Null(); + return nullptr; std::string filename_utf8 = name; filename_utf8.append(PLAYLIST_FILE_SUFFIX); @@ -126,7 +126,7 @@ map_spl_utf8_to_fs(const char *name) noexcept const auto filename_fs = AllocatedPath::FromUTF8(filename_utf8.c_str()); if (filename_fs.IsNull()) - return AllocatedPath::Null(); + return nullptr; return AllocatedPath::Build(playlist_dir_fs, filename_fs); } |