diff options
author | Denis Krjuchkov <denis@crazydev.net> | 2013-01-24 02:26:38 +0600 |
---|---|---|
committer | Denis Krjuchkov <denis@crazydev.net> | 2013-01-28 00:13:45 +0600 |
commit | 3c7cf94643bc45237d1e61c4e6015d498e4400b0 (patch) | |
tree | be93d9088f7b8199b0d07cce56017e6726a47f76 /src/fs/Path.hxx | |
parent | 3bd35d188320f20a98a1004c001b132fc0975437 (diff) | |
download | mpd-3c7cf94643bc45237d1e61c4e6015d498e4400b0.tar.gz mpd-3c7cf94643bc45237d1e61c4e6015d498e4400b0.tar.xz mpd-3c7cf94643bc45237d1e61c4e6015d498e4400b0.zip |
Path: convert fs_charset_to_utf8() to static method Path::ToUTF8()
Diffstat (limited to 'src/fs/Path.hxx')
-rw-r--r-- | src/fs/Path.hxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/fs/Path.hxx b/src/fs/Path.hxx index 0b51983f6..87c3551e9 100644 --- a/src/fs/Path.hxx +++ b/src/fs/Path.hxx @@ -49,13 +49,6 @@ void path_global_init(); void path_global_finish(); /** - * Converts a file name in the filesystem charset to UTF-8. Returns - * NULL on failure. - */ -char * -fs_charset_to_utf8(const char *path_fs); - -/** * Converts a file name in UTF-8 to the filesystem charset. Returns a * duplicate of the UTF-8 string on failure. */ @@ -174,6 +167,13 @@ public: } /** + * Convert the path to UTF-8. + * Returns empty string on error or if #path_fs is null pointer. + */ + gcc_pure + static std::string ToUTF8(const_pointer path_fs); + + /** * Copy a #Path object. */ Path &operator=(const Path &other) { @@ -257,7 +257,9 @@ public: * Returns empty string on error or if this instance is "nulled" * (#IsNull returns true). */ - std::string ToUTF8() const; + std::string ToUTF8() const { + return ToUTF8(value); + } }; #endif |