-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Use range based for loop #10844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use range based for loop #10844
Conversation
src/test/dbwrapper_tests.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Please use the form for (int x: {1, 2}) instead of for (int x: { 1, 2 } ).
The former is the dominant form used in the repo:
$ git grep -E "\{(true|false|0|1|2)" -- "*.cpp" | wc -l
112
$ git grep -E "\{ (true|false|0|1|2)" -- "*.cpp" | wc -l
9|
utACK ab005dd40dfc3e0e4ec126bbfc8144cd8a42e741 |
|
Make sure to adhere to the developer notes when touching code.
https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#developer-notes
There is even a link to a clang format script which should take care of
white space and braces for you.
…On Sun, Jul 16, 2017 at 4:19 PM, practicalswift ***@***.***> wrote:
utACK ab005dd
<ab005dd>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10844 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGGmv8DqLkFasoqXf5536iTb7Fn3OIgpks5sOhv-gaJpZM4OZTbC>
.
|
Instead of iterating over 0 .. 1 and then deciding on an actual desired value, use a range based for loop for the desired value.
ab005dd to
d0413c6
Compare
|
I was unaware of the clang format script. Thaks for the pointer. I let it change the commit, and squashed and force-pushed it. |
|
utACK d0413c6 |
1 similar comment
|
utACK d0413c6 |
d0413c6 Use range based for loop (René Nyffenegger) Pull request description: Instead of iterating over 0 .. 1 and then deciding on an actual desired value, use a range based for loop for the desired value. Tree-SHA512: 0a7a4a80516c9f16cf97fa7d257088b8386360e19b93c4deac3d745b6270ea452c513821686d7d14a159a235763e034f9b14eef222ca15f7eb71c37bd1c2c380
|
utACK d0413c6 |
Additional dbwrapper tests Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#7992 - bitcoin/bitcoin#9867 - Only the commit affecting dbwrapper tests - bitcoin/bitcoin#9610 - Only the change affecting dbwrapper tests - bitcoin/bitcoin#10844
d0413c6 Use range based for loop (René Nyffenegger) Pull request description: Instead of iterating over 0 .. 1 and then deciding on an actual desired value, use a range based for loop for the desired value. Tree-SHA512: 0a7a4a80516c9f16cf97fa7d257088b8386360e19b93c4deac3d745b6270ea452c513821686d7d14a159a235763e034f9b14eef222ca15f7eb71c37bd1c2c380
Instead of iterating over 0 .. 1 and then deciding on an actual desired
value, use a range based for loop for the desired value.