Skip to content

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

Open
fdoving wants to merge 1 commit intoRavenProject:developfrom
fdoving:fdov-btc10493
Open

backport: Use range-based for loops (C++11) when looping over map ele…#1172
fdoving wants to merge 1 commit intoRavenProject:developfrom
fdoving:fdov-btc10493

Conversation

@fdoving
Copy link
Contributor

@fdoving fdoving commented Dec 19, 2021

…ments

manual backport of bitcoin #10493
picked: 680bc2c

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: 680bc2c

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