Skip to content

Conversation

@ReneNyffenegger
Copy link
Contributor

Instead of iterating over 0 .. 1 and then deciding on an actual desired
value, use a range based for loop for the desired value.

Copy link
Contributor

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

@practicalswift
Copy link
Contributor

utACK ab005dd40dfc3e0e4ec126bbfc8144cd8a42e741

@maflcko
Copy link
Member

maflcko commented Jul 16, 2017 via email

Instead of iterating over 0 .. 1 and then deciding on an actual desired
value, use a range based for loop for the desired value.
@ReneNyffenegger
Copy link
Contributor Author

I was unaware of the clang format script. Thaks for the pointer. I let it change the commit, and squashed and force-pushed it.

@TheBlueMatt
Copy link
Contributor

utACK d0413c6

1 similar comment
@sipa
Copy link
Member

sipa commented Jul 16, 2017

utACK d0413c6

@sipa sipa merged commit d0413c6 into bitcoin:master Jul 16, 2017
sipa added a commit that referenced this pull request Jul 16, 2017
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
@maflcko
Copy link
Member

maflcko commented Jul 16, 2017

utACK d0413c6

zkbot added a commit to zcash/zcash that referenced this pull request Apr 4, 2018
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 24, 2019
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants