diff options
author | Max Kellermann <max@duempel.org> | 2013-10-17 21:59:35 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-17 23:43:46 +0200 |
commit | abfbd55305587306730d5419b8a3b09e6a43abcb (patch) | |
tree | 2a195220d79efe195f3beacb7dd3a226a3341ad6 /src/ConfigData.cxx | |
parent | b3611524f45c2a478f9decd6d22ecd1dbbbb64b9 (diff) | |
download | mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.gz mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.xz mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.zip |
fs/Path: rename to AllocatedPath
The new class Path only holds a string pointer without being
responsible for allocation/deallocation. The FileSystem.hxx library
accepts Path arguments instead of AllocatedPath, to avoid forcing
callers to allocate another string object.
Diffstat (limited to '')
-rw-r--r-- | src/ConfigData.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ConfigData.cxx b/src/ConfigData.cxx index 9655d6400..395d768f6 100644 --- a/src/ConfigData.cxx +++ b/src/ConfigData.cxx @@ -22,7 +22,7 @@ #include "ConfigParser.hxx" #include "ConfigPath.hxx" #include "util/Error.hxx" -#include "fs/Path.hxx" +#include "fs/AllocatedPath.hxx" #include "system/FatalError.hxx" #include <assert.h> @@ -86,7 +86,7 @@ config_param::GetBlockValue(const char *name, const char *default_value) const return bp->value.c_str(); } -Path +AllocatedPath config_param::GetBlockPath(const char *name, const char *default_value, Error &error) const { @@ -101,12 +101,12 @@ config_param::GetBlockPath(const char *name, const char *default_value, s = bp->value.c_str(); } else { if (default_value == nullptr) - return Path::Null(); + return AllocatedPath::Null(); s = default_value; } - Path path = ParsePath(s, error); + AllocatedPath path = ParsePath(s, error); if (gcc_unlikely(path.IsNull())) error.FormatPrefix("Invalid path in \"%s\" at line %i: ", name, line2); @@ -114,7 +114,7 @@ config_param::GetBlockPath(const char *name, const char *default_value, return path; } -Path +AllocatedPath config_param::GetBlockPath(const char *name, Error &error) const { return GetBlockPath(name, nullptr, error); |