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
c4f7740b
Commit
c4f7740b
authored
Jan 17, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs/Path: replace method Null() with nullptr_t constructor
parent
6c239f7a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
DecoderThread.cxx
src/decoder/DecoderThread.cxx
+1
-1
Path.hxx
src/fs/Path.hxx
+7
-9
run_input.cxx
test/run_input.cxx
+1
-1
No files found.
src/decoder/DecoderThread.cxx
View file @
c4f7740b
...
@@ -498,7 +498,7 @@ try {
...
@@ -498,7 +498,7 @@ try {
const
char
*
const
uri_utf8
=
song
.
GetRealURI
();
const
char
*
const
uri_utf8
=
song
.
GetRealURI
();
Path
path_fs
=
Path
::
Null
()
;
Path
path_fs
=
nullptr
;
AllocatedPath
path_buffer
=
AllocatedPath
::
Null
();
AllocatedPath
path_buffer
=
AllocatedPath
::
Null
();
if
(
PathTraitsUTF8
::
IsAbsolute
(
uri_utf8
))
{
if
(
PathTraitsUTF8
::
IsAbsolute
(
uri_utf8
))
{
path_buffer
=
AllocatedPath
::
FromUTF8Throw
(
uri_utf8
);
path_buffer
=
AllocatedPath
::
FromUTF8Throw
(
uri_utf8
);
...
...
src/fs/Path.hxx
View file @
c4f7740b
...
@@ -43,19 +43,17 @@ class Path : public PathTraitsFS::Pointer {
...
@@ -43,19 +43,17 @@ class Path : public PathTraitsFS::Pointer {
public
:
public
:
/**
/**
* Copy a #Path object.
* Construct a "nulled" instance. Its IsNull() method will
*/
constexpr
Path
(
const
Path
&
)
=
default
;
/**
* Return a "nulled" instance. Its IsNull() method will
* return true. Such an object must not be used.
* return true. Such an object must not be used.
*
*
* @see IsNull()
* @see IsNull()
*/
*/
static
constexpr
Path
Null
()
{
constexpr
Path
(
std
::
nullptr_t
)
:
Base
(
nullptr
)
{}
return
Path
(
nullptr
);
}
/**
* Copy a #Path object.
*/
constexpr
Path
(
const
Path
&
)
=
default
;
/**
/**
* Create a new instance pointing to the specified path
* Create a new instance pointing to the specified path
...
...
test/run_input.cxx
View file @
c4f7740b
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
struct
CommandLine
{
struct
CommandLine
{
const
char
*
uri
=
nullptr
;
const
char
*
uri
=
nullptr
;
Path
config_path
=
Path
::
Null
()
;
Path
config_path
=
nullptr
;
};
};
enum
Option
{
enum
Option
{
...
...
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