1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

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:
A Thousand Ships
2024-07-26 11:52:26 +02:00
parent 61598c5c88
commit 194bdde947
48 changed files with 169 additions and 170 deletions

View File

@@ -183,7 +183,7 @@ Transform3D XRServer::get_reference_frame() const {
}
void XRServer::center_on_hmd(RotationMode p_rotation_mode, bool p_keep_height) {
if (primary_interface == nullptr) {
if (primary_interface.is_null()) {
return;
}
@@ -235,7 +235,7 @@ void XRServer::_set_render_reference_frame(const Transform3D &p_reference_frame)
Transform3D XRServer::get_hmd_transform() {
Transform3D hmd_transform;
if (primary_interface != nullptr) {
if (primary_interface.is_valid()) {
hmd_transform = primary_interface->get_camera_transform();
}
return hmd_transform;