Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
58c7ec07
Commit
58c7ec07
authored
Mar 13, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs: use `using` instead of `typedef`
parent
3796247d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
20 deletions
+20
-20
AllocatedPath.hxx
src/fs/AllocatedPath.hxx
+4
-4
NarrowPath.hxx
src/fs/NarrowPath.hxx
+3
-3
Path.hxx
src/fs/Path.hxx
+1
-1
Traits.hxx
src/fs/Traits.hxx
+12
-12
No files found.
src/fs/AllocatedPath.hxx
View file @
58c7ec07
...
@@ -36,10 +36,10 @@
...
@@ -36,10 +36,10 @@
*/
*/
class
AllocatedPath
{
class
AllocatedPath
{
using
Traits
=
PathTraitsFS
;
using
Traits
=
PathTraitsFS
;
typedef
Traits
::
string
string
;
using
string
=
Traits
::
string
;
typedef
Traits
::
value_type
value_type
;
using
value_type
=
Traits
::
value_type
;
typedef
Traits
::
pointer
pointer
;
using
pointer
=
Traits
::
pointer
;
typedef
Traits
::
const_pointer
const_pointer
;
using
const_pointer
=
Traits
::
const_pointer
;
string
value
;
string
value
;
...
...
src/fs/NarrowPath.hxx
View file @
58c7ec07
...
@@ -37,11 +37,11 @@
...
@@ -37,11 +37,11 @@
*/
*/
class
NarrowPath
{
class
NarrowPath
{
#ifdef _UNICODE
#ifdef _UNICODE
typedef
AllocatedString
<>
Value
;
using
Value
=
AllocatedString
<>
;
#else
#else
typedef
StringPointer
<>
Value
;
using
Value
=
StringPointer
<>
;
#endif
#endif
typedef
typename
Value
::
const_pointer
const_pointer
;
using
const_pointer
=
typename
Value
::
const_pointer
;
Value
value
;
Value
value
;
...
...
src/fs/Path.hxx
View file @
58c7ec07
...
@@ -36,7 +36,7 @@ class AllocatedPath;
...
@@ -36,7 +36,7 @@ class AllocatedPath;
*/
*/
class
Path
:
public
PathTraitsFS
::
Pointer
{
class
Path
:
public
PathTraitsFS
::
Pointer
{
using
Traits
=
PathTraitsFS
;
using
Traits
=
PathTraitsFS
;
typedef
Traits
::
Pointer
Base
;
using
Base
=
Traits
::
Pointer
;
constexpr
Path
(
const_pointer
_value
)
noexcept
:
Base
(
_value
)
{}
constexpr
Path
(
const_pointer
_value
)
noexcept
:
Base
(
_value
)
{}
...
...
src/fs/Traits.hxx
View file @
58c7ec07
...
@@ -43,15 +43,15 @@
...
@@ -43,15 +43,15 @@
*/
*/
struct
PathTraitsFS
{
struct
PathTraitsFS
{
#ifdef _WIN32
#ifdef _WIN32
typedef
std
::
wstring
string
;
using
string
=
std
::
w
string
;
#else
#else
typedef
std
::
string
string
;
using
string
=
std
::
string
;
#endif
#endif
typedef
string
::
traits_type
char_traits
;
using
char_traits
=
string
::
traits_type
;
typedef
char_traits
::
char_type
value
_type
;
using
value_type
=
char_traits
::
char
_type
;
typedef
StringPointer
<
value_type
>
Pointer
;
using
Pointer
=
StringPointer
<
value_type
>
;
typedef
Pointer
::
pointer
pointer
;
using
pointer
=
Pointer
::
pointer
;
typedef
Pointer
::
const_pointer
const_pointer
;
using
const_pointer
=
Pointer
::
const_pointer
;
#ifdef _WIN32
#ifdef _WIN32
static
constexpr
value_type
SEPARATOR
=
'\\'
;
static
constexpr
value_type
SEPARATOR
=
'\\'
;
...
@@ -176,11 +176,11 @@ struct PathTraitsFS {
...
@@ -176,11 +176,11 @@ struct PathTraitsFS {
* This class describes the nature of a MPD internal filesystem path.
* This class describes the nature of a MPD internal filesystem path.
*/
*/
struct
PathTraitsUTF8
{
struct
PathTraitsUTF8
{
typedef
std
::
string
string
;
using
string
=
std
::
string
;
typedef
string
::
traits_type
char_traits
;
using
char_traits
=
string
::
traits_type
;
typedef
char_traits
::
char_type
value
_type
;
using
value_type
=
char_traits
::
char
_type
;
typedef
value_type
*
pointer
;
using
pointer
=
value_type
*
;
typedef
const
value_type
*
const_pointer
;
using
const_pointer
=
const
value_type
*
;
static
constexpr
value_type
SEPARATOR
=
'/'
;
static
constexpr
value_type
SEPARATOR
=
'/'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment