diff options
author | Kiminuo <kiminuo@protonmail.com> | 2021-05-22 15:01:04 +0200 |
---|---|---|
committer | Kiminuo <kiminuo@protonmail.com> | 2021-05-24 10:29:58 +0200 |
commit | 13bd8bb0536f008118b1de921654925ed9ce1da7 (patch) | |
tree | c37fe517ec7ff62e87d189a8a632bdad86988302 | |
parent | 4d8189f62076d47be182e709857774bc3921b334 (diff) |
Make `ArgsManager.GetDataDirPath` private and drop needless suffix
-rw-r--r-- | src/util/system.cpp | 2 | ||||
-rw-r--r-- | src/util/system.h | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp index 3613d780ca..3dcf3e9b6e 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -414,7 +414,7 @@ const fs::path& ArgsManager::GetBlocksDirPath() const return path; } -const fs::path& ArgsManager::GetDataDirPath(bool net_specific) const +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; diff --git a/src/util/system.h b/src/util/system.h index fcbbd24e83..6a4bd9f99e 100644 --- a/src/util/system.h +++ b/src/util/system.h @@ -274,7 +274,7 @@ public: * @return Absolute path on success, otherwise an empty path when a non-directory path would be returned * @post Returned directory path is created unless it is empty */ - const fs::path& GetDataDirBase() const { return GetDataDirPath(false); } + const fs::path& GetDataDirBase() const { return GetDataDir(false); } /** * Get data directory path with appended network identifier @@ -282,16 +282,7 @@ public: * @return Absolute path on success, otherwise an empty path when a non-directory path would be returned * @post Returned directory path is created unless it is empty */ - const fs::path& GetDataDirNet() const { return GetDataDirPath(true); } - - /** - * Get data directory path - * - * @param net_specific Append network identifier to the returned path - * @return Absolute path on success, otherwise an empty path when a non-directory path would be returned - * @post Returned directory path is created unless it is empty - */ - const fs::path& GetDataDirPath(bool net_specific = true) const; + const fs::path& GetDataDirNet() const { return GetDataDir(true); } /** * Clear cached directory paths @@ -453,6 +444,15 @@ public: void LogArgs() const; private: + /** + * Get data directory path + * + * @param net_specific Append network identifier to the returned path + * @return Absolute path on success, otherwise an empty path when a non-directory path would be returned + * @post Returned directory path is created unless it is empty + */ + const fs::path& GetDataDir(bool net_specific) const; + // Helper function for LogArgs(). void logArgsPrefix( const std::string& prefix, |