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/node/blockstorage.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/node/blockstorage.cpp')
-rw-r--r-- | src/node/blockstorage.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index bac05f6be2..6815fcd24d 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -414,7 +414,7 @@ void CleanupBlockRevFiles() // Remove the rev files immediately and insert the blk file paths into an // ordered map keyed by block file index. LogPrintf("Removing unusable blk?????.dat and rev?????.dat files for -reindex with -prune\n"); - fs::path blocksdir = gArgs.GetBlocksDirPath(); + const fs::path& blocksdir = gArgs.GetBlocksDirPath(); for (fs::directory_iterator it(blocksdir); it != fs::directory_iterator(); it++) { const std::string path = fs::PathToString(it->path().filename()); if (fs::is_regular_file(*it) && |