aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorKiminuo <kiminuo@protonmail.com>2021-04-08 23:14:34 +0200
committerKiminuo <kiminuo@protonmail.com>2021-04-17 19:18:10 +0200
commit70cdf679f8e665dbdc3301873a0267fe9faa72cd (patch)
treeb255b8164924d9a033a0a3cbd0b62d5c06ba5e03 /src/util
parent0dd7b234895b02bfc512ae83bd77b581c861d6e9 (diff)
downloadbitcoin-70cdf679f8e665dbdc3301873a0267fe9faa72cd.tar.xz
Move StripRedundantLastElementsOfPath before ArgsManager class.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/system.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index 0b83a76504..702cfdf1e4 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -235,6 +235,19 @@ static bool CheckValid(const std::string& key, const util::SettingsValue& val, u
return true;
}
+namespace {
+fs::path StripRedundantLastElementsOfPath(const fs::path& path)
+{
+ auto result = path;
+ while (result.filename().string() == ".") {
+ result = result.parent_path();
+ }
+
+ assert(fs::equivalent(result, path));
+ return result;
+}
+} // namespace
+
// Define default constructor and destructor that are not inline, so code instantiating this class doesn't need to
// #include class definitions for all members.
// For example, m_settings has an internal dependency on univalue.
@@ -723,19 +736,6 @@ fs::path GetDefaultDataDir()
#endif
}
-namespace {
-fs::path StripRedundantLastElementsOfPath(const fs::path& path)
-{
- auto result = path;
- while (result.filename().string() == ".") {
- result = result.parent_path();
- }
-
- assert(fs::equivalent(result, path));
- return result;
-}
-} // namespace
-
static fs::path g_blocks_path_cache_net_specific;
static fs::path pathCached;
static fs::path pathCachedNetSpecific;