From abfbd55305587306730d5419b8a3b09e6a43abcb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Oct 2013 21:59:35 +0200 Subject: 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. --- src/Mapper.hxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/Mapper.hxx') diff --git a/src/Mapper.hxx b/src/Mapper.hxx index 0688d5dd3..c340e6d64 100644 --- a/src/Mapper.hxx +++ b/src/Mapper.hxx @@ -31,11 +31,12 @@ #define PLAYLIST_FILE_SUFFIX ".m3u" class Path; +class AllocatedPath; struct Directory; struct Song; void -mapper_init(Path &&music_dir, Path &&playlist_dir); +mapper_init(AllocatedPath &&music_dir, AllocatedPath &&playlist_dir); void mapper_finish(void); @@ -51,7 +52,7 @@ mapper_get_music_directory_utf8(void); * filesystem character set. */ gcc_const -const Path & +const AllocatedPath & mapper_get_music_directory_fs(void); /** @@ -79,7 +80,7 @@ map_to_relative_path(const char *path_utf8); * and prepending the music directory. */ gcc_pure -Path +AllocatedPath map_uri_fs(const char *uri); /** @@ -89,7 +90,7 @@ map_uri_fs(const char *uri); * @return the path in file system encoding, or nullptr if mapping failed */ gcc_pure -Path +AllocatedPath map_directory_fs(const Directory *directory); /** @@ -101,7 +102,7 @@ map_directory_fs(const Directory *directory); * @return the path in file system encoding, or nullptr if mapping failed */ gcc_pure -Path +AllocatedPath map_directory_child_fs(const Directory *directory, const char *name); /** @@ -112,7 +113,7 @@ map_directory_child_fs(const Directory *directory, const char *name); * @return the path in file system encoding, or nullptr if mapping failed */ gcc_pure -Path +AllocatedPath map_song_fs(const Song *song); /** @@ -131,7 +132,7 @@ map_fs_to_utf8(const char *path_fs); * Returns the playlist directory. */ gcc_const -const Path & +const AllocatedPath & map_spl_path(void); /** @@ -142,7 +143,7 @@ map_spl_path(void); * @return the path in file system encoding, or nullptr if mapping failed */ gcc_pure -Path +AllocatedPath map_spl_utf8_to_fs(const char *name); #endif -- cgit v1.2.3