aboutsummaryrefslogtreecommitdiff
path: root/src/common/args.cpp
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2023-12-14 16:36:32 -0500
committerAva Chow <github@achow101.com>2023-12-14 16:46:54 -0500
commit1b2dedbf5c4520774df020d06d848f29e3439b52 (patch)
treeaa85ab412166217440677efbd9bca33c3640f7ec /src/common/args.cpp
parent08e6aaabef6c569ba634c86d396f0a840002a8d2 (diff)
parent66667130416b86208e01a0eb5541a15ea805ac26 (diff)
Merge bitcoin/bitcoin#29040: refactor: Remove pre-C++20 code, fs::path cleanup
66667130416b86208e01a0eb5541a15ea805ac26 refactor: Rename fs::path::u8string() to fs::path::utf8string() (MarcoFalke) 856c88776f8486446602476a1c9e133ac0cff510 ArgsManager: return path by value from GetBlocksDirPath() (Vasil Dimov) fa3d9304e80c214c8b073f12a7f4b08c5a94af04 refactor: Remove pre-C++20 fs code (MarcoFalke) fa00098e1a493aa3cce20335d18e7f5f2fb7a4a8 Add tests for C++20 std::u8string (MarcoFalke) fa2bac08c22182e738a8cabf1b24a9dbf3b092d2 refactor: Avoid copy/move in fs.h (MarcoFalke) faea30227ba633da5ab257d0247853e0927244bb refactor: Use C++20 std::chrono::days (MarcoFalke) Pull request description: This: * Removes dead code. * Avoids unused copies in some places. * Adds copies in other places for safety. ACKs for top commit: achow101: ACK 66667130416b86208e01a0eb5541a15ea805ac26 ryanofsky: Code review ACK 66667130416b86208e01a0eb5541a15ea805ac26. Just documentation change since last review. stickies-v: re-ACK 66667130416b86208e01a0eb5541a15ea805ac26 Tree-SHA512: 6176e44f30b310d51632ec2d3827c3819905d0ddc6a4b57acfcb6cfa1f9735176da75ee8ed4a4abd1296cb0b83bee9374cc6f91ffac87c19b63c435eeadf3f46
Diffstat (limited to 'src/common/args.cpp')
-rw-r--r--src/common/args.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/args.cpp b/src/common/args.cpp
index 1f25d13bee..a9108e5916 100644
--- a/src/common/args.cpp
+++ b/src/common/args.cpp
@@ -277,7 +277,7 @@ fs::path ArgsManager::GetPathArg(std::string arg, const fs::path& default_value)
return result.has_filename() ? result : result.parent_path();
}
-const fs::path& ArgsManager::GetBlocksDirPath() const
+fs::path ArgsManager::GetBlocksDirPath() const
{
LOCK(cs_args);
fs::path& path = m_cached_blocks_path;
@@ -302,7 +302,7 @@ const fs::path& ArgsManager::GetBlocksDirPath() const
return path;
}
-const fs::path& ArgsManager::GetDataDir(bool net_specific) const
+fs::path ArgsManager::GetDataDir(bool net_specific) const
{
LOCK(cs_args);
fs::path& path = net_specific ? m_cached_network_datadir_path : m_cached_datadir_path;