From abfbd55305587306730d5419b8a3b09e6a43abcb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Oct 2013 21:59:35 +0200 Subject: 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. --- src/ConfigData.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ConfigData.cxx') 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 @@ -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); -- cgit v1.2.3