Improve use of Ref.is_null/valid

Use `is_null` over `!is_valid` and vice versa.
This commit is contained in:
A Thousand Ships
2024-08-25 14:15:10 +02:00
committed by AThousandShips
parent 0f95e9f8e6
commit a1846b27ea
177 changed files with 517 additions and 519 deletions

View File

@@ -379,7 +379,7 @@ Rect2 PointLight2D::_edit_get_rect() const {
}
bool PointLight2D::_edit_use_rect() const {
return !texture.is_null();
return texture.is_valid();
}
#endif // DEBUG_ENABLED
@@ -433,7 +433,7 @@ Vector2 PointLight2D::get_texture_offset() const {
PackedStringArray PointLight2D::get_configuration_warnings() const {
PackedStringArray warnings = Light2D::get_configuration_warnings();
if (!texture.is_valid()) {
if (texture.is_null()) {
warnings.push_back(RTR("A texture with the shape of the light must be supplied to the \"Texture\" property."));
}