Use range-based for loops (C++11) when looping over vector elements
This commit is contained in:
+2
-2
@@ -604,8 +604,8 @@ void CBlockPolicyEstimator::processBlock(unsigned int nBlockHeight,
|
||||
|
||||
unsigned int countedTxs = 0;
|
||||
// Update averages with data points from current block
|
||||
for (unsigned int i = 0; i < entries.size(); i++) {
|
||||
if (processBlockTx(nBlockHeight, entries[i]))
|
||||
for (const auto& entry : entries) {
|
||||
if (processBlockTx(nBlockHeight, entry))
|
||||
countedTxs++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user