diff options
author | Aurèle Oulès <aurele@oules.com> | 2022-07-26 11:12:53 +0200 |
---|---|---|
committer | Aurèle Oulès <aurele@oules.com> | 2022-07-27 13:27:57 +0200 |
commit | 081b0e53e3adca7ea57d23e5fcd9db4b86415a72 (patch) | |
tree | 877f1eb2d246084e645f8cf5961d5541438a308b /src/init.cpp | |
parent | 7f79746bf046d0028bb68f265804b9774dec2acb (diff) | |
download | bitcoin-081b0e53e3adca7ea57d23e5fcd9db4b86415a72.tar.xz |
refactor: Make const refs vars where applicable
This avoids initializing variables with the copy-constructor of a
non-trivially copyable type.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index a94bbe6460..c1de3b3a04 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1083,7 +1083,7 @@ bool AppInitParameterInteraction(const ArgsManager& args, bool use_syscall_sandb static bool LockDataDirectory(bool probeOnly) { // Make sure only a single Bitcoin process is using the data directory. - fs::path datadir = gArgs.GetDataDirNet(); + const fs::path& datadir = gArgs.GetDataDirNet(); if (!DirIsWritable(datadir)) { return InitError(strprintf(_("Cannot write to data directory '%s'; check permissions."), fs::PathToString(datadir))); } |