You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00: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
@@ -198,7 +198,7 @@ void MeshLibraryEditor::_import_scene_parse_node(Ref<MeshLibrary> p_library, Has
|
||||
shape_transform *= static_body_node->get_transform() * static_body_node->shape_owner_get_transform(E);
|
||||
for (int k = 0; k < static_body_node->shape_owner_get_shape_count(E); k++) {
|
||||
Ref<Shape3D> collision_shape = static_body_node->shape_owner_get_shape(E, k);
|
||||
if (!collision_shape.is_valid()) {
|
||||
if (collision_shape.is_null()) {
|
||||
continue;
|
||||
}
|
||||
MeshLibrary::ShapeData shape_data;
|
||||
@@ -216,7 +216,7 @@ void MeshLibraryEditor::_import_scene_parse_node(Ref<MeshLibrary> p_library, Has
|
||||
continue;
|
||||
}
|
||||
Ref<NavigationMesh> navigation_mesh = navigation_region_node->get_navigation_mesh();
|
||||
if (!navigation_mesh.is_null()) {
|
||||
if (navigation_mesh.is_valid()) {
|
||||
Transform3D navigation_mesh_transform = navigation_region_node->get_transform();
|
||||
p_library->set_item_navigation_mesh(item_id, navigation_mesh);
|
||||
p_library->set_item_navigation_mesh_transform(item_id, navigation_mesh_transform);
|
||||
|
||||
Reference in New Issue
Block a user