No description provided.
Use range-based for loops (C++11) when looping over vector elements #10346
pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:range-based-for-loops changing 5 files +29 −31-
practicalswift commented at 9:06 PM on May 5, 2017: contributor
-
Use range-based for loops (C++11) when looping over vector elements a1c38a3a95
-
in src/wallet/wallet.cpp:1785 in a1c38a3a95
1780 | @@ -1781,8 +1781,8 @@ bool CWalletTx::IsEquivalentTo(const CWalletTx& _tx) const 1781 | { 1782 | CMutableTransaction tx1 = *this->tx; 1783 | CMutableTransaction tx2 = *_tx.tx; 1784 | - for (unsigned int i = 0; i < tx1.vin.size(); i++) tx1.vin[i].scriptSig = CScript(); 1785 | - for (unsigned int i = 0; i < tx2.vin.size(); i++) tx2.vin[i].scriptSig = CScript(); 1786 | + for (auto txIn : tx1.vin) txIn.scriptSig = CScript(); 1787 | + for (auto txIn : tx2.vin) txIn.scriptSig = CScript();
ryanofsky commented at 9:14 PM on May 5, 2017:These need to be
auto&to have an an effect. Probably all theautodeclarations here should be replaced byauto&orconst auto&
practicalswift commented at 9:41 PM on May 5, 2017:Was a bit too fast with submitting this - sorry about that. Closed this PR and cannot re-open. New correct PR submitted.
practicalswift closed this on May 5, 2017MarcoFalke locked this on Sep 8, 2021Contributors
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 15:15 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 15:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me