Skip to content

Correct usage of iter to comply with general rule#7076

Closed
xhzhf wants to merge 1 commit intoenvoyproxy:masterfrom
xhzhf:iter
Closed

Correct usage of iter to comply with general rule#7076
xhzhf wants to merge 1 commit intoenvoyproxy:masterfrom
xhzhf:iter

Conversation

@xhzhf
Copy link
Copy Markdown

@xhzhf xhzhf commented May 25, 2019

Signed-off-by: xhzhf guoyongxhzhf@163.com

For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md

Description:In general, if there is no special condition, iter shoule be added at same line with 'for'
Risk Level:Low
Testing:
Docs Changes:
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]

In general, if there is no special condition, iter shoule be added at same line with 'for'

Signed-off-by: xhzhf <guoyongxhzhf@163.com>
// the item currently being initialized, so we eschew range-based-for and do this complicated
// dance to increment the iterator before calling initialize.
for (auto iter = secondary_init_clusters_.begin(); iter != secondary_init_clusters_.end();) {
for (auto iter = secondary_init_clusters_.begin(); iter != secondary_init_clusters_.end(); ++iter) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

while messing with this, why not:

for (Cluster* cluster : secondary_init_clusters_) {
 ...

Copy link
Copy Markdown
Contributor

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

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

CI failures seem vaguely related but I can't figure out how your change could break things.

In the meantime, try merging master?

@htuch
Copy link
Copy Markdown
Member

htuch commented May 28, 2019

Please merge master to pick up #7090

@jmarantz jmarantz self-assigned this May 28, 2019
@jmarantz jmarantz changed the title Correct usage of iter to comply with generel rule Correct usage of iter to comply with general rule May 28, 2019
@stale
Copy link
Copy Markdown

stale Bot commented Jun 4, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale Bot added the stale stalebot believes this issue/PR has not been touched recently label Jun 4, 2019
@stale
Copy link
Copy Markdown

stale Bot commented Jun 11, 2019

This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale Bot closed this Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale stalebot believes this issue/PR has not been touched recently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants