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

@ -216,7 +216,7 @@ NodePath MeshInstance3D::get_skeleton_path() {
}
AABB MeshInstance3D::get_aabb() const {
if (!mesh.is_null()) {
if (mesh.is_valid()) {
return mesh->get_aabb();
}
@ -413,7 +413,7 @@ MeshInstance3D *MeshInstance3D::create_debug_tangents_node() {
Vector<Color> colors;
Ref<Mesh> m = get_mesh();
if (!m.is_valid()) {
if (m.is_null()) {
return nullptr;
}