-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Improve use of Ref.is_null/valid
#100776
Improve use of Ref.is_null/valid
#100776
Conversation
Use `is_null` over `!is_valid` and vice versa.
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.
Oh my goodness that's a lot.
context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/run_file"), FILE_RUN); | ||
context_menu->add_separator(); | ||
} | ||
if (scr.is_valid() && scr->is_tool()) { |
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.
Collapsed this as it was just redundant, cause if the mismatch of +/-
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.
LGTM
Thanks! |
Thank you! |
Use
is_null
over!is_valid
and vice versa.See:
Ref.is_null/valid
#96076