1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-04 19:21:46 +00:00

Replace NULL with nullptr

This commit is contained in:
lupoDharkael
2020-04-02 01:20:12 +02:00
parent 5f11e15571
commit 95a1400a2a
755 changed files with 5742 additions and 5742 deletions

View File

@@ -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;
};