Replace traditional for with ranged for in primitives

This commit is contained in:
Dag Robole
2017-07-21 12:27:23 +02:00
parent 6adc3a3732
commit 72f00608d0
2 changed files with 11 additions and 13 deletions

View File

@@ -25,9 +25,8 @@ std::string CBlock::ToString() const
hashMerkleRoot.ToString(),
nTime, nBits, nNonce,
vtx.size());
for (unsigned int i = 0; i < vtx.size(); i++)
{
s << " " << vtx[i]->ToString() << "\n";
for (const auto& tx : vtx) {
s << " " << tx->ToString() << "\n";
}
return s.str();
}