Skip to content
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

refactor: misc refactoring prefer std algorithm, range for loops; fix broken loop #4593

Merged
merged 4 commits into from
Nov 30, 2021

Conversation

PastaPastaPasta
Copy link
Member

Use some std algorithms instead of for loops, and range for loops instead of raw for loops. see individual commits.

Pay special attention to da7fc09, I believe the old loop is buggy, every iteration just sets firstNodeId, since bool first never gets set to false. This is a change in behavior.

@PastaPastaPasta PastaPastaPasta added this to the 18 milestone Nov 30, 2021
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👍

utACK

@UdjinM6 UdjinM6 merged commit b8c5604 into dashpay:develop Nov 30, 2021
@PastaPastaPasta PastaPastaPasta deleted the remove-some-for-loops branch November 30, 2021 06:01
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Nov 16, 2023
… broken loop (dashpay#4593)

* fix: replace seemingly buggy loop with std::adjacent_find

* Remove redundant variable declaration

* use std::fill instead of a loop

* remove a few raw for loops
gades pushed a commit to piratecash/pirate that referenced this pull request Dec 9, 2023
… broken loop (dashpay#4593)

* fix: replace seemingly buggy loop with std::adjacent_find

* Remove redundant variable declaration

* use std::fill instead of a loop

* remove a few raw for loops
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants