diff options
author | Max Kellermann <max@duempel.org> | 2015-03-03 12:28:47 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-03-03 12:28:47 +0100 |
commit | dfcfeeb5505c4fe55e7ba0e5d900b3045683843a (patch) | |
tree | 990a8a0f94578048a17b2f12d636d85450f04121 | |
parent | 820debf45a3bc5567fc16a4f982bdf41df7d7ef2 (diff) | |
download | mpd-dfcfeeb5505c4fe55e7ba0e5d900b3045683843a.tar.gz mpd-dfcfeeb5505c4fe55e7ba0e5d900b3045683843a.tar.xz mpd-dfcfeeb5505c4fe55e7ba0e5d900b3045683843a.zip |
fs/Traits: use std::char_traits
Diffstat (limited to '')
-rw-r--r-- | src/fs/Traits.hxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/fs/Traits.hxx b/src/fs/Traits.hxx index f00765570..9591290f7 100644 --- a/src/fs/Traits.hxx +++ b/src/fs/Traits.hxx @@ -37,7 +37,8 @@ */ struct PathTraitsFS { typedef std::string string; - typedef char value_type; + typedef string::traits_type char_traits; + typedef char_traits::char_type value_type; typedef value_type *pointer; typedef const value_type *const_pointer; @@ -97,7 +98,7 @@ struct PathTraitsFS { gcc_pure gcc_nonnull_all static size_t GetLength(const_pointer p) { - return strlen(p); + return char_traits::length(p); } /** @@ -145,7 +146,8 @@ struct PathTraitsFS { */ struct PathTraitsUTF8 { typedef std::string string; - typedef char value_type; + typedef string::traits_type char_traits; + typedef char_traits::char_type value_type; typedef value_type *pointer; typedef const value_type *const_pointer; @@ -190,7 +192,7 @@ struct PathTraitsUTF8 { gcc_pure gcc_nonnull_all static size_t GetLength(const_pointer p) { - return strlen(p); + return char_traits::length(p); } /** |