fs/Path: replace method Null() with nullptr_t constructor
This commit is contained in:
parent
6c239f7a00
commit
c4f7740b80
@ -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);
|
||||||
|
@ -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
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user