mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
refactor: Make const refs vars where applicable
This avoids initializing variables with the copy-constructor of a non-trivially copyable type.
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user