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

[Core,Drivers] Improve use of Ref.is_null/valid #96076

Merged

Conversation

AThousandShips
Copy link
Member

Use is_null over !is_valid and vice versa.

Split into parts for easier review.

@fire
Copy link
Member

fire commented Aug 25, 2024

I agree that using "positive" boolean math is better, but I don't know why we're doing this. Is there a bug or issue relating to this by the general godot engine community?

@AThousandShips
Copy link
Member Author

This is simply for conformity and clarity of code

Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

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

A bit prickly so it already needs a rebase

core/input/input_map.cpp Show resolved Hide resolved
@AThousandShips AThousandShips force-pushed the improve_null_check_core_drivers branch from 0f87090 to f6ebb12 Compare August 27, 2024 10:51
Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

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

I noticed this inconsistency as well and I looked forward to see it tweaked.

@AThousandShips AThousandShips force-pushed the improve_null_check_core_drivers branch from f6ebb12 to cd33444 Compare August 30, 2024 09:03
@AThousandShips AThousandShips force-pushed the improve_null_check_core_drivers branch from cd33444 to cdea2db Compare September 6, 2024 11:54
@AThousandShips AThousandShips force-pushed the improve_null_check_core_drivers branch from cdea2db to bf402da Compare September 14, 2024 14:09
Use `is_null` over `!is_valid` and vice versa.
@AThousandShips AThousandShips force-pushed the improve_null_check_core_drivers branch from bf402da to ec650a2 Compare November 1, 2024 15:50
@AThousandShips
Copy link
Member Author

Haven't gone back over these to ensure no new ones have cropped up but I tend to keep an eye on reviews so there shouldn't be anything missing

@Repiteo Repiteo modified the milestones: 4.x, 4.4 Dec 23, 2024
@Repiteo
Copy link
Contributor

Repiteo commented Dec 23, 2024

I'll operate under the assumption that it's accurate; future tweaks likely won't need to be sectioned off like this anyway

@Repiteo Repiteo merged commit 3c304ab into godotengine:master Dec 23, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 23, 2024

Thanks!

@AThousandShips AThousandShips deleted the improve_null_check_core_drivers branch December 23, 2024 17:23
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.

4 participants