Reduce variable scopes.
Reduce variable scopes #12780
pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:limit-variable-scopes changing 3 files +3 −5-
practicalswift commented at 8:50 PM on March 25, 2018: contributor
-
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..
promag commented at 9:07 PM on March 25, 2018: memberutACK.
practicalswift force-pushed on Mar 25, 2018practicalswift force-pushed on Mar 25, 2018fanquake added the label Refactoring on Mar 25, 2018in 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?
dcousens approvedrandolf approvedpracticalswift force-pushed on Mar 26, 2018Reduce variable scopes 6a318e48a6practicalswift force-pushed on Mar 26, 2018practicalswift commented at 10:08 AM on March 26, 2018: contributorPlease re-review :-)
randolf approvedEmpact commented at 9:02 PM on March 27, 2018: memberutACK 6a318e4
MarcoFalke commented at 10:01 PM on March 27, 2018: memberutACK 6a318e48a67a8f9834e14c960bd4f5b6e295b2dc
MarcoFalke merged this on Mar 30, 2018MarcoFalke closed this on Mar 30, 2018MarcoFalke referenced this in commit be299c4a47 on Mar 30, 2018PastaPastaPasta referenced this in commit ffa2839b10 on Sep 27, 2020PastaPastaPasta referenced this in commit 79b0c69743 on Oct 22, 2020PastaPastaPasta referenced this in commit b4f29b6a9c on Oct 27, 2020practicalswift deleted the branch on Apr 10, 2021gades referenced this in commit 45580ac576 on Feb 21, 2022DrahtBot locked this on Aug 16, 2022Labels
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