mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Merge pull request #5601 from PastaPastaPasta/backport-23573
backport: Merge bitcoin/bitcoin#23573: refactor: cast bool operands to int to silence compiler warning
This commit is contained in:
commit
5e5b571be6
@ -755,8 +755,11 @@ public:
|
||||
const CBlockIndex* block2 = m_node.chainman->m_blockman.LookupBlockIndex(block_hash2);
|
||||
const CBlockIndex* ancestor = block1 && block2 ? LastCommonAncestor(block1, block2) : nullptr;
|
||||
// Using & instead of && below to avoid short circuiting and leaving
|
||||
// output uninitialized.
|
||||
return FillBlock(ancestor, ancestor_out, lock, active) & FillBlock(block1, block1_out, lock, active) & FillBlock(block2, block2_out, lock, active);
|
||||
// output uninitialized. Cast bool to int to avoid -Wbitwise-instead-of-logical
|
||||
// compiler warnings.
|
||||
return int{FillBlock(ancestor, ancestor_out, lock, active)} &
|
||||
int{FillBlock(block1, block1_out, lock, active)} &
|
||||
int{FillBlock(block2, block2_out, lock, active)};
|
||||
}
|
||||
void findCoins(std::map<COutPoint, Coin>& coins) override { return FindCoins(m_node, coins); }
|
||||
double guessVerificationProgress(const uint256& block_hash) override
|
||||
|
Loading…
Reference in New Issue
Block a user