aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistMapper.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 21:59:35 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 23:43:46 +0200
commitabfbd55305587306730d5419b8a3b09e6a43abcb (patch)
tree2a195220d79efe195f3beacb7dd3a226a3341ad6 /src/PlaylistMapper.cxx
parentb3611524f45c2a478f9decd6d22ecd1dbbbb64b9 (diff)
downloadmpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.gz
mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.xz
mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.zip
fs/Path: rename to AllocatedPath
The new class Path only holds a string pointer without being responsible for allocation/deallocation. The FileSystem.hxx library accepts Path arguments instead of AllocatedPath, to avoid forcing callers to allocate another string object.
Diffstat (limited to 'src/PlaylistMapper.cxx')
-rw-r--r--src/PlaylistMapper.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/PlaylistMapper.cxx b/src/PlaylistMapper.cxx
index b8ea7eb85..11e10f7ba 100644
--- a/src/PlaylistMapper.cxx
+++ b/src/PlaylistMapper.cxx
@@ -22,7 +22,7 @@
#include "PlaylistFile.hxx"
#include "PlaylistRegistry.hxx"
#include "Mapper.hxx"
-#include "fs/Path.hxx"
+#include "fs/AllocatedPath.hxx"
#include "util/UriUtil.hxx"
#include <assert.h>
@@ -49,15 +49,16 @@ playlist_open_in_playlist_dir(const char *uri, Mutex &mutex, Cond &cond,
{
assert(spl_valid_name(uri));
- const Path &playlist_directory_fs = map_spl_path();
+ const auto &playlist_directory_fs = map_spl_path();
if (playlist_directory_fs.IsNull())
return nullptr;
- const Path uri_fs = Path::FromUTF8(uri);
+ const auto uri_fs = AllocatedPath::FromUTF8(uri);
if (uri_fs.IsNull())
return nullptr;
- const Path path_fs = Path::Build(playlist_directory_fs, uri_fs);
+ const auto path_fs =
+ AllocatedPath::Build(playlist_directory_fs, uri_fs);
assert(!path_fs.IsNull());
return playlist_open_path(path_fs.c_str(), mutex, cond, is_r);
@@ -72,7 +73,7 @@ playlist_open_in_music_dir(const char *uri, Mutex &mutex, Cond &cond,
{
assert(uri_safe_local(uri));
- Path path = map_uri_fs(uri);
+ const auto path = map_uri_fs(uri);
if (path.IsNull())
return nullptr;