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

Fix find_children not searching recursively in some cases #63785

Conversation

heppocogne
Copy link
Contributor

This commit fixes #63757

@heppocogne heppocogne requested a review from a team as a code owner August 1, 2022 16:02
@Calinou Calinou added this to the 4.0 milestone Aug 1, 2022
@heppocogne heppocogne force-pushed the Fix-find_children-not-recursive branch from 5cc6d45 to 2756590 Compare August 4, 2022 04:10
@YuriSizov
Copy link
Contributor

The fix itself makes sense, but we don't normally resort to goto...

@heppocogne
Copy link
Contributor Author

Honestly, I don't want to use goto either. So, should I replace goto with the following code?

if (p_recursive) {
	ret.append_array(cptr[i]->find_children(p_pattern, p_type, true, p_owned));
}
continue;

@YuriSizov YuriSizov modified the milestones: 4.0, 4.1 Feb 16, 2023
@Maran23
Copy link
Contributor

Maran23 commented Apr 17, 2023

Honestly, I don't want to use goto either. So, should I replace goto with the following code?

Yes, or think about another way.

Comment on lines 1419 to 1421
if (p_owned && !cptr[i]->data.owner) {
continue;
goto next_loop;
}
Copy link
Member

Choose a reason for hiding this comment

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

Regarding this change I think the previous behavior might be intended, see #75459 (comment).

@akien-mga
Copy link
Member

Superseded by #75459.

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

Successfully merging this pull request may close these issues.

find_children returns [] if match string is given
6 participants