diff options
author | Max Kellermann <max@duempel.org> | 2014-11-30 00:17:08 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-11-30 00:28:27 +0100 |
commit | 4f80a129f13daae72e0463923250534e0d437026 (patch) | |
tree | c7e0a3713cd32b6ac7dbf318c418be79f907c23a /src/fs/Charset.cxx | |
parent | 6987f2ba82ca2205efa5a0ff9088f4555fe607c1 (diff) | |
download | mpd-4f80a129f13daae72e0463923250534e0d437026.tar.gz mpd-4f80a129f13daae72e0463923250534e0d437026.tar.xz mpd-4f80a129f13daae72e0463923250534e0d437026.zip |
fs/Charset: return std::string from PathFromUTF8()
Don't expose pointer that requires the caller to invoke g_free(),
because that's GLib-only.
Diffstat (limited to '')
-rw-r--r-- | src/fs/Charset.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fs/Charset.cxx b/src/fs/Charset.cxx index c98170c24..fb7313a35 100644 --- a/src/fs/Charset.cxx +++ b/src/fs/Charset.cxx @@ -157,13 +157,13 @@ PathToUTF8(const char *path_fs) #ifdef HAVE_FS_CHARSET -char * +std::string PathFromUTF8(const char *path_utf8) { assert(path_utf8 != nullptr); if (fs_charset.empty()) - return g_strdup(path_utf8); + return path_utf8; return g_convert(path_utf8, -1, fs_charset.c_str(), "utf-8", |