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

Use positive condition in if check #21194

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

Conversation

hangshao0
Copy link
Contributor

@hangshao0 hangshao0 commented Feb 26, 2025

Use isContendedClassLayout() instead of !isContendedClassLayout()

Use isContendedClassLayout() instead of !isContendedClassLayout()

Signed-off-by: Hang Shao <[email protected]>
@hangshao0
Copy link
Contributor Author

Noticed while reviewing the code. Positive condition is preferred.

@pshipton
Copy link
Member

I'm not sure about this change, the common case is not to have a contended class. This might risk a performance regression.

@hangshao0
Copy link
Contributor Author

The other places are using positive condition isContendedClassLayout().

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.

2 participants