diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-17 12:17:41 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-01-17 12:17:41 +0100 |
commit | bbc5212436021cd76f173ce60d7f0d95411d3319 (patch) | |
tree | a6b517c25799913d4cf7f3b5fbc95d143a9a53e3 /src/config | |
parent | c4f7740b800c49ad119e5d70335ea51a666e0114 (diff) |
fs/AllocatedPath: make the nullptr_t constructor public
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/Block.cxx | 2 | ||||
-rw-r--r-- | src/config/ConfigGlobal.cxx | 2 | ||||
-rw-r--r-- | src/config/ConfigGlobal.hxx | 2 | ||||
-rw-r--r-- | src/config/ConfigPath.cxx | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/config/Block.cxx b/src/config/Block.cxx index 51f4321db..86ad226c6 100644 --- a/src/config/Block.cxx +++ b/src/config/Block.cxx @@ -118,7 +118,7 @@ ConfigBlock::GetPath(const char *name, const char *default_value) const s = bp->value.c_str(); } else { if (default_value == nullptr) - return AllocatedPath::Null(); + return nullptr; s = default_value; } diff --git a/src/config/ConfigGlobal.cxx b/src/config/ConfigGlobal.cxx index b1d631a3e..621e59307 100644 --- a/src/config/ConfigGlobal.cxx +++ b/src/config/ConfigGlobal.cxx @@ -125,7 +125,7 @@ config_get_path(ConfigOption option) { const auto *param = config_get_param(option); if (param == nullptr) - return AllocatedPath::Null(); + return nullptr; return param->GetPath(); } diff --git a/src/config/ConfigGlobal.hxx b/src/config/ConfigGlobal.hxx index 89a4b7cad..a44cfe3f8 100644 --- a/src/config/ConfigGlobal.hxx +++ b/src/config/ConfigGlobal.hxx @@ -71,7 +71,7 @@ config_get_string(enum ConfigOption option, /** * Returns an optional configuration variable which contains an * absolute path. If there is a tilde prefix, it is expanded. - * Returns AllocatedPath::Null() if the value is not present. + * Returns nullptr if the value is not present. * * Throws #std::runtime_error on error. */ diff --git a/src/config/ConfigPath.cxx b/src/config/ConfigPath.cxx index 204b626f6..2e75a4b59 100644 --- a/src/config/ConfigPath.cxx +++ b/src/config/ConfigPath.cxx @@ -86,7 +86,7 @@ ParsePath(const char *path) if (*path == '\0') return GetConfiguredHome(); - AllocatedPath home = AllocatedPath::Null(); + AllocatedPath home = nullptr; if (*path == '/') { home = GetConfiguredHome(); @@ -107,11 +107,11 @@ ParsePath(const char *path) } if (home.IsNull()) - return AllocatedPath::Null(); + return nullptr; AllocatedPath path2 = AllocatedPath::FromUTF8Throw(path); if (path2.IsNull()) - return AllocatedPath::Null(); + return nullptr; return AllocatedPath::Build(home, path2); } else if (!PathTraitsUTF8::IsAbsolute(path)) { |