diff options
author | fanquake <fanquake@gmail.com> | 2022-03-25 21:04:14 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-03-25 21:04:51 +0000 |
commit | 2f0f056e08cd5a1435120592a9ecd212fcdb915b (patch) | |
tree | 47a5385e7736ce97ea8aac8313c08d9a2cef2c54 /src | |
parent | 6d5771ba07780ac67d5e30108ae6b860f3878e7d (diff) | |
parent | 7e22d80af333b202939bcb2631082006c097bf22 (diff) |
Merge bitcoin/bitcoin#24665: doc: document clang tidy named args
7e22d80af333b202939bcb2631082006c097bf22 addrman: fix incorrect named args (fanquake)
67f654ef612c8dbefb969e6e67c286ea2c2e82d6 doc: Document clang-tidy in dev notes (MarcoFalke)
Pull request description:
The documentation, and a single commit extracted from #24661.
Motivation:
> Incorrect named args are source of bugs, like https://github.com/bitcoin/bitcoin/pull/22979.
> To allow them being checked by clang-tidy, use a format it can understand.
ACKs for top commit:
glozow:
ACK 7e22d80af333b202939bcb2631082006c097bf22
Tree-SHA512: 4037fcea59fdf583b171bce7ad350299fe5f9feb3c398413432168f3b9a185e51884d5b30e4b4ab9c6c5bb896c178cfaee1d78d5b4f0034cd70121c9ea4184b7
Diffstat (limited to 'src')
-rw-r--r-- | src/addrman.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp index 2fd8143c1c..2a08d99eef 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -946,16 +946,16 @@ std::optional<AddressPosition> AddrManImpl::FindAddressEntry_(const CAddress& ad if(addr_info->fInTried) { int bucket{addr_info->GetTriedBucket(nKey, m_asmap)}; - return AddressPosition(/*tried=*/true, - /*multiplicity=*/1, - /*bucket=*/bucket, - /*position=*/addr_info->GetBucketPosition(nKey, false, bucket)); + return AddressPosition(/*tried_in=*/true, + /*multiplicity_in=*/1, + /*bucket_in=*/bucket, + /*position_in=*/addr_info->GetBucketPosition(nKey, false, bucket)); } else { int bucket{addr_info->GetNewBucket(nKey, m_asmap)}; - return AddressPosition(/*tried=*/false, - /*multiplicity=*/addr_info->nRefCount, - /*bucket=*/bucket, - /*position=*/addr_info->GetBucketPosition(nKey, true, bucket)); + return AddressPosition(/*tried_in=*/false, + /*multiplicity_in=*/addr_info->nRefCount, + /*bucket_in=*/bucket, + /*position_in=*/addr_info->GetBucketPosition(nKey, true, bucket)); } } |