Skip to content

Commit 13bd8bb

Browse files
committed
Make ArgsManager.GetDataDirPath private and drop needless suffix
1 parent 4d8189f commit 13bd8bb

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/util/system.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ const fs::path& ArgsManager::GetBlocksDirPath() const
414414
return path;
415415
}
416416

417-
const fs::path& ArgsManager::GetDataDirPath(bool net_specific) const
417+
const fs::path& ArgsManager::GetDataDir(bool net_specific) const
418418
{
419419
LOCK(cs_args);
420420
fs::path& path = net_specific ? m_cached_network_datadir_path : m_cached_datadir_path;

src/util/system.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -274,24 +274,15 @@ class ArgsManager
274274
* @return Absolute path on success, otherwise an empty path when a non-directory path would be returned
275275
* @post Returned directory path is created unless it is empty
276276
*/
277-
const fs::path& GetDataDirBase() const { return GetDataDirPath(false); }
277+
const fs::path& GetDataDirBase() const { return GetDataDir(false); }
278278

279279
/**
280280
* Get data directory path with appended network identifier
281281
*
282282
* @return Absolute path on success, otherwise an empty path when a non-directory path would be returned
283283
* @post Returned directory path is created unless it is empty
284284
*/
285-
const fs::path& GetDataDirNet() const { return GetDataDirPath(true); }
286-
287-
/**
288-
* Get data directory path
289-
*
290-
* @param net_specific Append network identifier to the returned path
291-
* @return Absolute path on success, otherwise an empty path when a non-directory path would be returned
292-
* @post Returned directory path is created unless it is empty
293-
*/
294-
const fs::path& GetDataDirPath(bool net_specific = true) const;
285+
const fs::path& GetDataDirNet() const { return GetDataDir(true); }
295286

296287
/**
297288
* Clear cached directory paths
@@ -453,6 +444,15 @@ class ArgsManager
453444
void LogArgs() const;
454445

455446
private:
447+
/**
448+
* Get data directory path
449+
*
450+
* @param net_specific Append network identifier to the returned path
451+
* @return Absolute path on success, otherwise an empty path when a non-directory path would be returned
452+
* @post Returned directory path is created unless it is empty
453+
*/
454+
const fs::path& GetDataDir(bool net_specific) const;
455+
456456
// Helper function for LogArgs().
457457
void logArgsPrefix(
458458
const std::string& prefix,

0 commit comments

Comments
 (0)