Cleanup of raw nullptr checks with Ref
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
This commit is contained in:
parent
61598c5c88
commit
194bdde947
48 changed files with 169 additions and 170 deletions
|
|
@ -229,7 +229,7 @@ Ref<GLTFPhysicsShape> GLTFPhysicsShape::from_resource(const Ref<Shape3D> &p_shap
|
|||
}
|
||||
|
||||
Ref<Shape3D> GLTFPhysicsShape::to_resource(bool p_cache_shapes) {
|
||||
if (!p_cache_shapes || _shape_cache == nullptr) {
|
||||
if (!p_cache_shapes || _shape_cache.is_null()) {
|
||||
if (shape_type == "box") {
|
||||
Ref<BoxShape3D> box;
|
||||
box.instantiate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue