mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
This commit is contained in:
committed by
AThousandShips
parent
0f95e9f8e6
commit
a1846b27ea
@@ -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."));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user