-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 find
with contains/has
where applicable
#91619
Conversation
find
with contains/has
where applicable
f6cc0a1
to
73d9525
Compare
73d9525
to
81f9d00
Compare
Guess this line could be changed too (after d8aa2c6): godot/editor/connections_dialog.cpp Line 285 in d8aa2c6
|
That's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff looks fine and I really appreciate this change!
Thanks for splitting the patch, it really helped with reviewing as I could go in full pattern-matching mode with the word diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also looks good to me. I guess we can squash before merge now that it's been reviewed.
* Replaces `find(...) != -1` with `contains` for `String` * Replaces `find(...) == -1` with `!contains` for `String` * Replaces `find(...) != -1` with `has` for containers * Replaces `find(...) == -1` with `!has` for containers
81f9d00
to
a0dbdcc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much! Spotted nothing.
Thanks! |
Thank you! |
find(...) != -1
,find(...) > -1
,find(...) >= 0
withcontains
forString
find(...) == -1
,find(...) < 0
with!contains
forString
find(...) != -1
,find(...) > -1
,find(...) >= 0
withhas
for containersfind(...) == -1
,find(...) < 0
with!has
for containersSplit into four commits for review to make it easier to compare each type, to check the replacements are appropriate