From 081b0e53e3adca7ea57d23e5fcd9db4b86415a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A8le=20Oul=C3=A8s?= Date: Tue, 26 Jul 2022 11:12:53 +0200 Subject: refactor: Make const refs vars where applicable This avoids initializing variables with the copy-constructor of a non-trivially copyable type. --- src/node/blockstorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/node') 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) && -- cgit v1.2.3