[Qt] constify foreach uses where possible #6378

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:foreach_const changing 4 files +9 −14
  1. Diapolo commented at 6:15 AM on July 6, 2015: none
    • this doesn't replace BOOST_FOREACH, it just makes used arguments const where possible
  2. Diapolo renamed this:
    [Qt] consity foreach uses where possible
    [Qt] constify foreach uses where possible
    on Jul 6, 2015
  3. in src/qt/coincontroldialog.cpp:None in 692b77c2cf outdated
     689 | @@ -691,8 +690,7 @@ void CoinControlDialog::updateView()
     690 |      map<QString, vector<COutput> > mapCoins;
     691 |      model->listCoins(mapCoins);
     692 |  
     693 | -    BOOST_FOREACH(PAIRTYPE(QString, vector<COutput>) coins, mapCoins)
     694 | -    {
     695 | +    BOOST_FOREACH(const PAIRTYPE(QString, vector<COutput>) coins, mapCoins) {
    


    laanwj commented at 8:26 PM on July 6, 2015:

    Do make it a reference as well:

     BOOST_FOREACH(const PAIRTYPE(QString, vector<COutput>) &coins, mapCoins) {
    

    If a copy is made anyway, making it const has little benefit.

  4. laanwj commented at 8:27 PM on July 6, 2015: member

    utACK apart from nit

  5. [Qt] constify foreach uses where possible
    - this doesn't replace BOOST_FOREACH, it just makes used arguments const
      where possible
    5e058e7417
  6. Diapolo commented at 4:55 AM on July 7, 2015: none

    @laanwj Thanks for catching that, nit fixed.

  7. laanwj merged this on Jul 9, 2015
  8. laanwj closed this on Jul 9, 2015

  9. laanwj referenced this in commit aa565327ec on Jul 9, 2015
  10. Diapolo deleted the branch on Jul 9, 2015
  11. MarcoFalke locked this on Sep 8, 2021
Contributors

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-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me