fs: use `using` instead of `typedef`
This commit is contained in:
parent
3796247d6d
commit
58c7ec07a4
|
@ -36,10 +36,10 @@
|
|||
*/
|
||||
class AllocatedPath {
|
||||
using Traits = PathTraitsFS;
|
||||
typedef Traits::string string;
|
||||
typedef Traits::value_type value_type;
|
||||
typedef Traits::pointer pointer;
|
||||
typedef Traits::const_pointer const_pointer;
|
||||
using string = Traits::string;
|
||||
using value_type = Traits::value_type;
|
||||
using pointer = Traits::pointer;
|
||||
using const_pointer = Traits::const_pointer;
|
||||
|
||||
string value;
|
||||
|
||||
|
|
|
@ -37,11 +37,11 @@
|
|||
*/
|
||||
class NarrowPath {
|
||||
#ifdef _UNICODE
|
||||
typedef AllocatedString<> Value;
|
||||
using Value = AllocatedString<>;
|
||||
#else
|
||||
typedef StringPointer<> Value;
|
||||
using Value = StringPointer<>;
|
||||
#endif
|
||||
typedef typename Value::const_pointer const_pointer;
|
||||
using const_pointer = typename Value::const_pointer;
|
||||
|
||||
Value value;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class AllocatedPath;
|
|||
*/
|
||||
class Path : public PathTraitsFS::Pointer {
|
||||
using Traits = PathTraitsFS;
|
||||
typedef Traits::Pointer Base;
|
||||
using Base = Traits::Pointer;
|
||||
|
||||
constexpr Path(const_pointer _value) noexcept:Base(_value) {}
|
||||
|
||||
|
|
|
@ -43,15 +43,15 @@
|
|||
*/
|
||||
struct PathTraitsFS {
|
||||
#ifdef _WIN32
|
||||
typedef std::wstring string;
|
||||
using string = std::wstring;
|
||||
#else
|
||||
typedef std::string string;
|
||||
using string = std::string;
|
||||
#endif
|
||||
typedef string::traits_type char_traits;
|
||||
typedef char_traits::char_type value_type;
|
||||
typedef StringPointer<value_type> Pointer;
|
||||
typedef Pointer::pointer pointer;
|
||||
typedef Pointer::const_pointer const_pointer;
|
||||
using char_traits = string::traits_type;
|
||||
using value_type = char_traits::char_type;
|
||||
using Pointer = StringPointer<value_type>;
|
||||
using pointer = Pointer::pointer;
|
||||
using const_pointer = Pointer::const_pointer;
|
||||
|
||||
#ifdef _WIN32
|
||||
static constexpr value_type SEPARATOR = '\\';
|
||||
|
@ -176,11 +176,11 @@ struct PathTraitsFS {
|
|||
* This class describes the nature of a MPD internal filesystem path.
|
||||
*/
|
||||
struct PathTraitsUTF8 {
|
||||
typedef std::string string;
|
||||
typedef string::traits_type char_traits;
|
||||
typedef char_traits::char_type value_type;
|
||||
typedef value_type *pointer;
|
||||
typedef const value_type *const_pointer;
|
||||
using string = std::string;
|
||||
using char_traits = string::traits_type;
|
||||
using value_type = char_traits::char_type;
|
||||
using pointer = value_type *;
|
||||
using const_pointer = const value_type *;
|
||||
|
||||
static constexpr value_type SEPARATOR = '/';
|
||||
|
||||
|
|
Loading…
Reference in New Issue