Prefer iterators arrow operator over iterator dereference to improve readability
Prefer iterators arrow operator over iterator dereference #10907
pull bytting wants to merge 1 commits into bitcoin:master from bytting:20170722-refactor-arrow-1 changing 18 files +82 −82-
bytting commented at 10:51 AM on July 22, 2017: contributor
- dcousens approved
- fanquake added the label Refactoring on Jul 22, 2017
-
practicalswift commented at 7:27 PM on July 22, 2017: contributor
Should we extend this to doing it globally? If so, the following might be of help:
git grep -E '\(\*[a-zA-Z0-9]+\)\.(first|second)' # 80 occurrences of # which 7 in validation.cppIdeally such a change should probably be made as an scripted-diff.
-
bytting commented at 1:37 AM on July 23, 2017: contributor
For the sake of completeness I added a few more (@practicalswift, thanks for the regex)
I'm not quite comfortable with automating this but if someone wants to go for that, that's fine with me. If automation makes this PR redundant, feel free to close it.
Also, if this regex is to be automated, we should probably take the possibility of whitespaces between the parentheses into consideration.
-
Use iterators arrow operator over iterator dereference d9dd96f903
-
laanwj commented at 2:31 PM on October 9, 2017: member
Although I agree with you with regard to readability, I'm not convinced this is worth the risk to do as a global change. Sorry, closing.
- laanwj closed this on Oct 9, 2017
- DrahtBot locked this on Sep 8, 2021
Contributors
Labels