diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-02 14:52:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 14:52:36 +0200 |
commit | 058a0afdeca83145d58a95c426dd01216c397ea9 (patch) | |
tree | be0cd59e5a90926e9d653fed9f3b1b77e735ca2f /servers/arvr_server.cpp | |
parent | 5f11e1557156617366d2c316a97716172103980d (diff) | |
parent | 95a1400a2ac9de1a29fa305f45b928ce8e3044bd (diff) |
Merge pull request #37338 from lupoDharkael/nullprt
Replace NULL with nullptr
Diffstat (limited to 'servers/arvr_server.cpp')
-rw-r--r-- | servers/arvr_server.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp index 724414ae96..f5597d8974 100644 --- a/servers/arvr_server.cpp +++ b/servers/arvr_server.cpp @@ -33,7 +33,7 @@ #include "arvr/arvr_positional_tracker.h" #include "core/project_settings.h" -ARVRServer *ARVRServer::singleton = NULL; +ARVRServer *ARVRServer::singleton = nullptr; ARVRServer *ARVRServer::get_singleton() { return singleton; @@ -109,7 +109,7 @@ Transform ARVRServer::get_reference_frame() const { }; void ARVRServer::center_on_hmd(RotationMode p_rotation_mode, bool p_keep_height) { - if (primary_interface != NULL) { + if (primary_interface != nullptr) { // clear our current reference frame or we'll end up double adjusting it reference_frame = Transform(); @@ -142,7 +142,7 @@ void ARVRServer::center_on_hmd(RotationMode p_rotation_mode, bool p_keep_height) Transform ARVRServer::get_hmd_transform() { Transform hmd_transform; - if (primary_interface != NULL) { + if (primary_interface != nullptr) { hmd_transform = primary_interface->get_transform_for_eye(ARVRInterface::EYE_MONO, hmd_transform); }; return hmd_transform; @@ -189,7 +189,7 @@ int ARVRServer::get_interface_count() const { }; Ref<ARVRInterface> ARVRServer::get_interface(int p_index) const { - ERR_FAIL_INDEX_V(p_index, interfaces.size(), NULL); + ERR_FAIL_INDEX_V(p_index, interfaces.size(), nullptr); return interfaces[p_index]; }; @@ -205,7 +205,7 @@ Ref<ARVRInterface> ARVRServer::find_interface(const String &p_name) const { }; }; - ERR_FAIL_COND_V(idx == -1, NULL); + ERR_FAIL_COND_V(idx == -1, nullptr); return interfaces[idx]; }; @@ -296,13 +296,13 @@ int ARVRServer::get_tracker_count() const { }; ARVRPositionalTracker *ARVRServer::get_tracker(int p_index) const { - ERR_FAIL_INDEX_V(p_index, trackers.size(), NULL); + ERR_FAIL_INDEX_V(p_index, trackers.size(), nullptr); return trackers[p_index]; }; ARVRPositionalTracker *ARVRServer::find_by_type_and_id(TrackerType p_tracker_type, int p_tracker_id) const { - ERR_FAIL_COND_V(p_tracker_id == 0, NULL); + ERR_FAIL_COND_V(p_tracker_id == 0, nullptr); for (int i = 0; i < trackers.size(); i++) { if (trackers[i]->get_type() == p_tracker_type && trackers[i]->get_tracker_id() == p_tracker_id) { @@ -310,7 +310,7 @@ ARVRPositionalTracker *ARVRServer::find_by_type_and_id(TrackerType p_tracker_typ }; }; - return NULL; + return nullptr; }; Ref<ARVRInterface> ARVRServer::get_primary_interface() const { @@ -382,5 +382,5 @@ ARVRServer::~ARVRServer() { trackers.remove(0); } - singleton = NULL; + singleton = nullptr; }; |