Reduce variable scopes #12780

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:limit-variable-scopes changing 3 files +3 −5
  1. practicalswift commented at 8:50 PM on March 25, 2018: contributor

    Reduce variable scopes.

  2. in src/qt/recentrequeststablemodel.cpp:144 in 1bf29c6ab3 outdated
     138 | @@ -139,10 +139,9 @@ bool RecentRequestsTableModel::removeRows(int row, int count, const QModelIndex
     139 |  
     140 |      if(count > 0 && row >= 0 && (row+count) <= list.size())
     141 |      {
     142 | -        const RecentRequestEntry *rec;
     143 |          for (int i = 0; i < count; ++i)
     144 |          {
     145 | -            rec = &list[row+i];
     146 | +            const RecentRequestEntry *rec = &list[row+i];
    


    promag commented at 9:07 PM on March 25, 2018:

    RecentRequestEntry* rec


    practicalswift commented at 9:35 AM on March 26, 2018:

    cc @Empact :-)


    promag commented at 10:00 AM on March 26, 2018:

    Ah I didn't mean to remove const, sorry, just the space..

  3. promag commented at 9:07 PM on March 25, 2018: member

    utACK.

  4. practicalswift force-pushed on Mar 25, 2018
  5. practicalswift force-pushed on Mar 25, 2018
  6. fanquake added the label Refactoring on Mar 25, 2018
  7. in src/qt/recentrequeststablemodel.cpp:144 in 35665f2c8a outdated
     138 | @@ -139,10 +139,9 @@ bool RecentRequestsTableModel::removeRows(int row, int count, const QModelIndex
     139 |  
     140 |      if(count > 0 && row >= 0 && (row+count) <= list.size())
     141 |      {
     142 | -        const RecentRequestEntry *rec;
     143 |          for (int i = 0; i < count; ++i)
     144 |          {
     145 | -            rec = &list[row+i];
     146 | +            RecentRequestEntry *rec = &list[row+i];
    


    Empact commented at 12:25 AM on March 26, 2018:

    const?

  8. dcousens approved
  9. randolf approved
  10. practicalswift force-pushed on Mar 26, 2018
  11. Reduce variable scopes 6a318e48a6
  12. practicalswift force-pushed on Mar 26, 2018
  13. practicalswift commented at 10:08 AM on March 26, 2018: contributor

    Please re-review :-)

  14. randolf approved
  15. Empact commented at 9:02 PM on March 27, 2018: member

    utACK 6a318e4

  16. MarcoFalke commented at 10:01 PM on March 27, 2018: member

    utACK 6a318e48a67a8f9834e14c960bd4f5b6e295b2dc

  17. MarcoFalke merged this on Mar 30, 2018
  18. MarcoFalke closed this on Mar 30, 2018

  19. MarcoFalke referenced this in commit be299c4a47 on Mar 30, 2018
  20. PastaPastaPasta referenced this in commit ffa2839b10 on Sep 27, 2020
  21. PastaPastaPasta referenced this in commit 79b0c69743 on Oct 22, 2020
  22. PastaPastaPasta referenced this in commit b4f29b6a9c on Oct 27, 2020
  23. practicalswift deleted the branch on Apr 10, 2021
  24. gades referenced this in commit 45580ac576 on Feb 21, 2022
  25. DrahtBot locked this on Aug 16, 2022

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 site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me