aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2022-12-17 12:52:38 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2022-12-17 12:52:41 +0100
commitcb32328d1b80d0ccd6eb9532bd8fe4e0a4de385e (patch)
tree4213b4020e376f6378a09515b2d01d7ee58b9124 /src
parent6c01323d9d18e8b919662004a475d490b6b746b6 (diff)
parent48033d43dc30fcee2c9a38c828d2f58d3bc11827 (diff)
Merge bitcoin/bitcoin#26710: refactor: Fix `performance-for-range-copy` in headers
48033d43dc30fcee2c9a38c828d2f58d3bc11827 clang-tidy: Fix `performance-for-range-copy` in headers (Hennadii Stepanov) Pull request description: Split from bitcoin/bitcoin#26705 as was requested in https://github.com/bitcoin/bitcoin/pull/26705#issuecomment-1353293405. To test this PR, consider applying a diff as follows: ```diff --- a/src/.clang-tidy +++ b/src/.clang-tidy @@ -12,17 +12,9 @@ readability-redundant-declaration, readability-redundant-string-init, ' WarningsAsErrors: ' -bugprone-argument-comment, -bugprone-use-after-move, -misc-unused-using-decls, -modernize-use-default-member-init, -modernize-use-nullptr, performance-for-range-copy, -performance-move-const-arg, -performance-unnecessary-copy-initialization, -readability-redundant-declaration, -readability-redundant-string-init, ' CheckOptions: - key: performance-move-const-arg.CheckTriviallyCopyableMove value: false +HeaderFilterRegex: '.' ``` ACKs for top commit: MarcoFalke: review ACK 48033d43dc30fcee2c9a38c828d2f58d3bc11827 Tree-SHA512: eaf7a0e9b4fdc4ce788f78e5675632f3c278fc24bee2434874cbabc3e25ad7059b0c53ab7834908e901872d5afee08acba860542b03454c09fe129be6ad03f09
Diffstat (limited to 'src')
-rw-r--r--src/psbt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/psbt.h b/src/psbt.h
index b636f0348b..fc9ac71eee 100644
--- a/src/psbt.h
+++ b/src/psbt.h
@@ -178,7 +178,7 @@ void SerializeHDKeypath(Stream& s, KeyOriginInfo hd_keypath)
template<typename Stream>
void SerializeHDKeypaths(Stream& s, const std::map<CPubKey, KeyOriginInfo>& hd_keypaths, CompactSizeWriter type)
{
- for (auto keypath_pair : hd_keypaths) {
+ for (const auto& keypath_pair : hd_keypaths) {
if (!keypath_pair.first.IsValid()) {
throw std::ios_base::failure("Invalid CPubKey being serialized");
}