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

Replace error checks against size with is_empty #87371

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

AThousandShips
Copy link
Member

Replacing just the size -> is_empty here because those are the cases I feel improves readability, also fixes some unusual cases like < 1 and <= 0

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Feb 9, 2024
@AThousandShips
Copy link
Member Author

AThousandShips commented Feb 9, 2024

For reference these were searched for with ERR_FAIL_COND(_V)?(_MSG)?\(\w+\.size\(\) (== 0|< 1) and ERR_FAIL_COND(_V)?(_MSG)?\(!\w+\.size\(\) as far as I recall, and verified these were all when rebasing now, so should be complete

@akien-mga akien-mga merged commit d00dc8f into godotengine:master Feb 9, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@AThousandShips AThousandShips deleted the size_err_check branch February 9, 2024 17:16
@AThousandShips
Copy link
Member Author

Thank you!

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.

2 participants