godot icon indicating copy to clipboard operation
godot copied to clipboard

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

Open AThousandShips opened this issue 1 year ago • 2 comments
trafficstars

Use is_null over !is_valid and vice versa.

Split into parts for easier review.

AThousandShips avatar Aug 25 '24 16:08 AThousandShips

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?

fire avatar Aug 25 '24 22:08 fire

This is simply for conformity and clarity of code

AThousandShips avatar Aug 26 '24 06:08 AThousandShips

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

AThousandShips avatar Dec 23 '24 16:12 AThousandShips

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

Repiteo avatar Dec 23 '24 16:12 Repiteo

Thanks!

Repiteo avatar Dec 23 '24 17:12 Repiteo