diff options
author | Fabian Jahr <fjahr@protonmail.com> | 2021-05-24 00:46:08 +0200 |
---|---|---|
committer | Fabian Jahr <fjahr@protonmail.com> | 2021-05-24 18:55:06 +0200 |
commit | 8ea8c927ac05980d6a81252e40b7444e9abb74f9 (patch) | |
tree | 1a75aec3117f85172470f49ccb3cf9039f7c5418 /src/index | |
parent | b295395664bd37e26d168c329f238237b34aef8c (diff) | |
download | bitcoin-8ea8c927ac05980d6a81252e40b7444e9abb74f9.tar.xz |
index: Avoid unnecessary type casts in coinstatsindex
Diffstat (limited to 'src/index')
-rw-r--r-- | src/index/coinstatsindex.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/index/coinstatsindex.cpp b/src/index/coinstatsindex.cpp index e046527283..5e3f7602c8 100644 --- a/src/index/coinstatsindex.cpp +++ b/src/index/coinstatsindex.cpp @@ -143,10 +143,10 @@ bool CoinStatsIndex::WriteBlock(const CBlock& block, const CBlockIndex* pindex) continue; } - for (size_t j = 0; j < tx->vout.size(); ++j) { + for (uint32_t j = 0; j < tx->vout.size(); ++j) { const CTxOut& out{tx->vout[j]}; Coin coin{out, pindex->nHeight, tx->IsCoinBase()}; - COutPoint outpoint{tx->GetHash(), static_cast<uint32_t>(j)}; + COutPoint outpoint{tx->GetHash(), j}; // Skip unspendable coins if (coin.out.scriptPubKey.IsUnspendable()) { @@ -402,9 +402,9 @@ bool CoinStatsIndex::ReverseBlock(const CBlock& block, const CBlockIndex* pindex for (size_t i = 0; i < block.vtx.size(); ++i) { const auto& tx{block.vtx.at(i)}; - for (size_t j = 0; j < tx->vout.size(); ++j) { + for (uint32_t j = 0; j < tx->vout.size(); ++j) { const CTxOut& out{tx->vout[j]}; - COutPoint outpoint{tx->GetHash(), static_cast<uint32_t>(j)}; + COutPoint outpoint{tx->GetHash(), j}; Coin coin{out, pindex->nHeight, tx->IsCoinBase()}; // Skip unspendable coins |