diff options
author | Max Kellermann <max@duempel.org> | 2013-10-14 21:43:41 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-14 21:43:41 +0200 |
commit | 9067da2df8472d6c5871f075654dc0561fbb13f3 (patch) | |
tree | 2d12e6d9099d7ba0bf7946764c3141b18ff56457 /src/Mapper.hxx | |
parent | 8cf2f52f7acfd22dc85e0ed5ef6bd04cf55d31aa (diff) |
Mapper: map_fs_to_utf8() returns std::string
Avoid the conversion to an allocated char*, let the caller decide.
Diffstat (limited to 'src/Mapper.hxx')
-rw-r--r-- | src/Mapper.hxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Mapper.hxx b/src/Mapper.hxx index a224b8051..76c1a6dac 100644 --- a/src/Mapper.hxx +++ b/src/Mapper.hxx @@ -24,6 +24,8 @@ #ifndef MPD_MAPPER_HXX #define MPD_MAPPER_HXX +#include <string> + #include "gcc.h" #define PLAYLIST_FILE_SUFFIX ".m3u" @@ -118,10 +120,11 @@ map_song_fs(const Song *song); * absolute) to a relative path in UTF-8 encoding. * * @param path_fs a path in file system encoding - * @return the relative path in UTF-8, or nullptr if mapping failed + * @return the relative path in UTF-8, or an empty string if mapping + * failed */ -gcc_malloc -char * +gcc_pure +std::string map_fs_to_utf8(const char *path_fs); /** |