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

backport: Use range-based for loops (C++11) when looping over map ele… #1172

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

fdoving
Copy link
Contributor

@fdoving fdoving commented Dec 19, 2021

…ments

manual backport of bitcoin #10493
picked: 680bc2cbb34d6bedd0e64b17d0555216572be4c8

Origial-author: practicalswift

Before this commit:

for (std::map<T1, T2>::iterator x = y.begin(); x != y.end(); ++x) {
}

After this commit:

for (auto& x : y) {
}

…ments

manual backport of bitcoin #10493
picked: 680bc2cbb34d6bedd0e64b17d0555216572be4c8

Origial-author: practicalswift

Before this commit:

  for (std::map<T1, T2>::iterator x = y.begin(); x != y.end(); ++x) {
  }

After this commit:

  for (auto& x : y) {
  }
Copy link
Contributor

@hans-schmidt hans-schmidt left a comment

Choose a reason for hiding this comment

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

These changes are functionally identical to what bitcoin did. (There are two extra changes in wallet.cpp related to IsAssetScript, and some bracket reformatting).
This doesn't actually do anything except update some code to cleaner C++11 syntax.
Approved.

Copy link
Contributor

@HyperPeek HyperPeek left a comment

Choose a reason for hiding this comment

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

approved, cleanup using c++11 features in loops with no functional change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants