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
@@ -432,7 +432,7 @@ void XRServer::_process() {
|
||||
|
||||
// process all active interfaces
|
||||
for (int i = 0; i < interfaces.size(); i++) {
|
||||
if (!interfaces[i].is_valid()) {
|
||||
if (interfaces[i].is_null()) {
|
||||
// ignore, not a valid reference
|
||||
} else if (interfaces[i]->is_initialized()) {
|
||||
interfaces.write[i]->process();
|
||||
@@ -446,7 +446,7 @@ void XRServer::pre_render() {
|
||||
|
||||
// process all active interfaces
|
||||
for (int i = 0; i < interfaces.size(); i++) {
|
||||
if (!interfaces[i].is_valid()) {
|
||||
if (interfaces[i].is_null()) {
|
||||
// ignore, not a valid reference
|
||||
} else if (interfaces[i]->is_initialized()) {
|
||||
interfaces.write[i]->pre_render();
|
||||
@@ -459,7 +459,7 @@ void XRServer::end_frame() {
|
||||
|
||||
// process all active interfaces
|
||||
for (int i = 0; i < interfaces.size(); i++) {
|
||||
if (!interfaces[i].is_valid()) {
|
||||
if (interfaces[i].is_null()) {
|
||||
// ignore, not a valid reference
|
||||
} else if (interfaces[i]->is_initialized()) {
|
||||
interfaces.write[i]->end_frame();
|
||||
|
||||
Reference in New Issue
Block a user