diff options
author | Max Kellermann <max@duempel.org> | 2015-02-25 16:10:24 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-02-25 19:17:45 +0100 |
commit | eb174d5ba317743ca21295697df90a7ed66a64bb (patch) | |
tree | 1d63d91b3517353fac94b5706d37606d93616696 /src/fs/Charset.cxx | |
parent | 4c899e9c5aec4d7fea56da95eed8784a41ea4b5b (diff) | |
download | mpd-eb174d5ba317743ca21295697df90a7ed66a64bb.tar.gz mpd-eb174d5ba317743ca21295697df90a7ed66a64bb.tar.xz mpd-eb174d5ba317743ca21295697df90a7ed66a64bb.zip |
fs/{Allocated,}Path,Charset: use PathTraitsFS typedefs
Diffstat (limited to 'src/fs/Charset.cxx')
-rw-r--r-- | src/fs/Charset.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/fs/Charset.cxx b/src/fs/Charset.cxx index ae495b6ae..bc6357297 100644 --- a/src/fs/Charset.cxx +++ b/src/fs/Charset.cxx @@ -22,7 +22,6 @@ #include "Domain.hxx" #include "Limits.hxx" #include "Log.hxx" -#include "Traits.hxx" #include "lib/icu/Converter.hxx" #include "util/Error.hxx" @@ -73,13 +72,13 @@ GetFSCharset() #endif } -static inline std::string && -FixSeparators(std::string &&s) +static inline PathTraitsUTF8::string && +FixSeparators(PathTraitsUTF8::string &&s) { // For whatever reason GCC can't convert constexpr to value reference. // This leads to link errors when passing separators directly. - auto from = PathTraitsFS::SEPARATOR; auto to = PathTraitsUTF8::SEPARATOR; + decltype(to) from = PathTraitsFS::SEPARATOR; if (from != to) /* convert backslash to slash on WIN32 */ @@ -88,8 +87,8 @@ FixSeparators(std::string &&s) return std::move(s); } -std::string -PathToUTF8(const char *path_fs) +PathTraitsUTF8::string +PathToUTF8(PathTraitsFS::const_pointer path_fs) { #if !CLANG_CHECK_VERSION(3,6) /* disabled on clang due to -Wtautological-pointer-compare */ @@ -108,8 +107,8 @@ PathToUTF8(const char *path_fs) #ifdef HAVE_FS_CHARSET -std::string -PathFromUTF8(const char *path_utf8) +PathTraitsFS::string +PathFromUTF8(PathTraitsUTF8::const_pointer path_utf8) { #if !CLANG_CHECK_VERSION(3,6) /* disabled on clang due to -Wtautological-pointer-compare */ |