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/coins.cpp | |
parent | 7f79746bf046d0028bb68f265804b9774dec2acb (diff) |
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/coins.cpp')
-rw-r--r-- | src/coins.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coins.cpp b/src/coins.cpp index 1abdcb54d2..6905781879 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -296,7 +296,7 @@ bool CCoinsViewErrorCatcher::GetCoin(const COutPoint &outpoint, Coin &coin) cons try { return CCoinsViewBacked::GetCoin(outpoint, coin); } catch(const std::runtime_error& e) { - for (auto f : m_err_callbacks) { + for (const auto& f : m_err_callbacks) { f(); } LogPrintf("Error reading from database: %s\n", e.what()); |