clang-tidy: Fix performance-for-range-copy in headers

See https://clang.llvm.org/extra/clang-tidy/checks/performance/for-range-copy.html
This commit is contained in:
Hennadii Stepanov 2022-12-16 10:53:55 +00:00
parent 5055d07edf
commit 48033d43dc
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

View File

@ -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");
}