Simplify "bool x = y ? true : false" to "bool x = y"

This commit is contained in:
practicalswift
2017-06-08 12:06:09 +02:00
parent 9f841a6c3d
commit 67ca816849
3 changed files with 6 additions and 6 deletions

View File

@@ -172,7 +172,7 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c
bool PartiallyDownloadedBlock::IsTxAvailable(size_t index) const {
assert(!header.IsNull());
assert(index < txn_available.size());
return txn_available[index] ? true : false;
return txn_available[index] != nullptr;
}
ReadStatus PartiallyDownloadedBlock::FillBlock(CBlock& block, const std::vector<CTransactionRef>& vtx_missing) {