aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/Charset.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-02-09 07:44:21 +0100
committerMax Kellermann <max@duempel.org>2015-02-09 07:44:21 +0100
commit60e6d1d61b1c56d3a94fa73779f240b8d7d43a89 (patch)
tree6128e67cbcbfadbcf1b35575097750f02ff715cf /src/fs/Charset.cxx
parent975e275030b467af7abc1c8465f55513f4cc3aa0 (diff)
downloadmpd-60e6d1d61b1c56d3a94fa73779f240b8d7d43a89.tar.gz
mpd-60e6d1d61b1c56d3a94fa73779f240b8d7d43a89.tar.xz
mpd-60e6d1d61b1c56d3a94fa73779f240b8d7d43a89.zip
fs/Charset: convert #ifdef to regular "if"
Diffstat (limited to '')
-rw-r--r--src/fs/Charset.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fs/Charset.cxx b/src/fs/Charset.cxx
index 5532a2cb6..ae495b6ae 100644
--- a/src/fs/Charset.cxx
+++ b/src/fs/Charset.cxx
@@ -76,13 +76,15 @@ GetFSCharset()
static inline std::string &&
FixSeparators(std::string &&s)
{
-#ifdef WIN32
// 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;
- std::replace(s.begin(), s.end(), from, to);
-#endif
+
+ if (from != to)
+ /* convert backslash to slash on WIN32 */
+ std::replace(s.begin(), s.end(), from, to);
+
return std::move(s);
}